hibernate.config.xml
老师是从哪找的config.xml的?
老师是从哪找的config.xml的?
2017-04-09
我在hibernate-release-4.3.0.Final包中找到的不能用,在其他的包里面找了一个啊:
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
<property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
<property name="hibernate.connection.username">sa</property>
<property name="hibernate.connection.password"></property>
<property name="hibernate.connection.url">jdbc:hsqldb:.</property>
<property name="hibernate.cache.use_query_cache">true</property>
<property name="hibernate.cache.region_prefix">hibernate.test</property>
<property name="hibernate.jdbc.use_streams_for_binary">true</property>
<property name="hibernate.jdbc.batch_size">0</property>
<property name="hibernate.max_fetch_depth">3</property>
<property name="hibernate.hbm2ddl.auto">create-drop</property>
<property name="hibernate.generate_statistics">true</property>
<property name="hibernate.cache.region.factory_class">org.hibernate.testing.cache.CachingRegionFactory</property>
<mapping class="org.hibernate.ejb.test.Item"/>
<mapping class="org.hibernate.ejb.test.Cat"/>
<mapping class="org.hibernate.ejb.test.Kitten"/>
<mapping class="org.hibernate.ejb.test.Distributor"/>
<class-cache class="org.hibernate.ejb.test.Item" usage="read-write"/>
<collection-cache collection="org.hibernate.ejb.test.Item.distributors" usage="read-write" region="RegionName"/>
</session-factory>
</hibernate-configuration>
举报