当前位置: 代码迷 >> Java相关 >> spring中的hibnate如何配置 ?最好能说下原理
  详细解决方案

spring中的hibnate如何配置 ?最好能说下原理

热度:499   发布时间:2013-02-25 21:47:26.0
spring中的hibnate怎么配置 ?最好能说下原理
spring中的hibnate怎么配置 原理是什么 类从哪里得到
谢谢!!!

------解决方案--------------------------------------------------------
XML code
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">        <property name="dataSource" ref="datasource"></property>        <property name="configurationClass">            <value>org.hibernate.cfg.AnnotationConfiguration</value>        </property>        <property name="hibernateProperties">            <props>                <prop key="hibernate.dialect">${hibernate.dialect}</prop>                <prop key="hibernate.show_sql">${hibernate.show_sql}</prop>                <prop key="hibernate.hbm2ddl.auto">${hibernate.hbm2ddl.auto}</prop>            </props>        </property>        <property name="configLocations">            <list>                <value>classpath*:hibernate.cfg.xml</value>            </list>        </property>    </bean>
------解决方案--------------------------------------------------------
http://blog.csdn.net/luohuijun619/article/details/5012957
  相关解决方案