1. 程式人生 > >搭建SSH環境之新增所需jar包

搭建SSH環境之新增所需jar包

複製程式碼
<?xml version='1.0' encoding='utf-8'?>
<!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>
    <!-- 1,資料庫連線資訊 -->
    <
property name="dialect"> org.hibernate.dialect.MySQL5InnoDBDialect </property> <!-- 2,其他配置 --> <property name="show_sql">true</property> <property name="hbm2ddl.auto">update</property> <!-- 3,匯入對映檔案 --> <mapping resource="cn/oa2014/oa/domain/User.hbm.xml"
/> <mapping resource="cn/oa2014/oa/domain/Role.hbm.xml" /> <mapping resource="cn/oa2014/oa/domain/Department.hbm.xml" /> <mapping resource="cn/oa2014/oa/domain/Privilege.hbm.xml" /> </session-factory> </hibernate-configuration>
複製程式碼