81,122
社区成员




<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0">
<persistence-unit name="library" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<properties>
<property name = "hibernate.connection.driver_class" value = "com.microsoft.sqlserver.jdbc.SQLServerDriver"/>
<property name = "hibernate.connection.url" value = "jdbc:sqlserver://localhost:1433;databaseName=mylibrary"/>
<property name = "hibernate.connection.username" value = "sa"/>
<property name = "hibernate.connection.password" value = "sa"/>
<property name = "hibernate.hbm2ddl.auto" value = "update"/>
<property name="hibernate.show_sql" value="true"/>
<!-- 设置II级缓存供应商 -->
<property name="hibernate.cache.provider_class" value="org.hibernate.cache.EhCacheProvider" />
<property name="hibernate.cache.use_query_cache" value="true"/>
<property name="hibernate.cache.use_second_level_cache" value="true"/>
<property name="hibernate.cache.use_structured_entries" value="true"/>
</properties>
</persistence-unit>
</persistence>