hibernate.cgf.xml

<hibernate-configuration>

<session-factory>

<propertyname="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>

<propertyname="hibernate.connection.password">root</property>

<propertyname="hibernate.connection.url">jdbc:mysql:///test</property>

<propertyname="hibernate.connection.username">root</property>

<propertyname="hibernate.dialect">org.hibernate.dialect.MySQL5InnoDBDialect</property>

<propertyname="hibernate.hbm2ddl.auto">update</property>

<propertyname="hibernate.show_sql">true</property>

<propertyname="hibernate.cache.use_second_level_cache">true</property>

<propertyname="hibernate.cache.provider_class">org.hibernate.cache.EhCacheProvider</property>

<propertyname="hibernate.cache.use_query_cache">true</property>

<mappingresource="org/cric/model/Student.hbm.xml"/>

<mappingresource="org/cric/model/Clazz.hbm.xml"/>

</session-factory>

</hibernate-configuration>

相关推荐