Hibernate.cfg.xml相关的参数配置
来源:互联网 发布:http aq.js cj.com 编辑:程序博客网 时间:2024/05/22 06:09
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<!--设置此属性表示应用程序可以自动生成表:update表示应用程序启动时会与数据库的表进行匹配,如果匹配不了就会报错 -->
<property name="hbm2ddl.auto">update</property>
<!-- 设定此应用程序使用了什么类型的数据库 -->
<property name="dialect">
org.hibernate.dialect.SQLServerDialect
</property>
<!-- 在程序运行时是否显示sql语句 -->
<property name="show_sql">true</property>
<!-- 加载驱动 -->
<property name="connection.driver_class">
com.microsoft.sqlserver.jdbc.SQLServerDriver
</property>
<!-- 设置数据库url -->
<property name="connection.url">
jdbc:sqlserver://127.0.0.1:1433;databaseName=student
</property>
<!-- 设置数据库用户名 -->
<property name="connection.username">pengtian</property>
<!-- 设置数据库密码 -->
<property name="connection.password">123456</property>
<!-- 打开二级缓存 -->
<property name="hibernate.cache.use_second_level_cache">true</property>
<property name="hibernate.cache.provider_class">org.hibernate.cache.OSCacheProvider</property>
<!-- 打开统计信息 -->
<property name="hibernate.generate_statistics">true</property>
<!-- 配置映射文件 -->
<mapping resource="hibernate/domain/Person.hbm.xml" />
</session-factory>
</hibernate-configuration>
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<!--设置此属性表示应用程序可以自动生成表:update表示应用程序启动时会与数据库的表进行匹配,如果匹配不了就会报错 -->
<property name="hbm2ddl.auto">update</property>
<!-- 设定此应用程序使用了什么类型的数据库 -->
<property name="dialect">
org.hibernate.dialect.SQLServerDialect
</property>
<!-- 在程序运行时是否显示sql语句 -->
<property name="show_sql">true</property>
<!-- 加载驱动 -->
<property name="connection.driver_class">
com.microsoft.sqlserver.jdbc.SQLServerDriver
</property>
<!-- 设置数据库url -->
<property name="connection.url">
jdbc:sqlserver://127.0.0.1:1433;databaseName=student
</property>
<!-- 设置数据库用户名 -->
<property name="connection.username">pengtian</property>
<!-- 设置数据库密码 -->
<property name="connection.password">123456</property>
<!-- 打开二级缓存 -->
<property name="hibernate.cache.use_second_level_cache">true</property>
<property name="hibernate.cache.provider_class">org.hibernate.cache.OSCacheProvider</property>
<!-- 打开统计信息 -->
<property name="hibernate.generate_statistics">true</property>
<!-- 配置映射文件 -->
<mapping resource="hibernate/domain/Person.hbm.xml" />
</session-factory>
</hibernate-configuration>
- Hibernate.cfg.xml相关的参数配置
- Hibernate.cfg.xml的配置
- Hibernate.cfg.xml的配置
- hibernate.cfg.xml的配置
- hibernate.cfg.xml的配置
- Hibernate.cfg.xml的配置
- hibernate.cfg.xml的配置
- Hibernate.cfg.xml 参数配置意义
- Hibernate里面的hibernate.cfg.xml配置
- Hibernate的hibernate.cfg.xml配置
- hibernate.cfg.xml的参数详解
- hibernate.cfg.xml配置
- hibernate.cfg.xml配置
- hibernate.cfg.xml配置
- hibernate.cfg.xml配置
- hibernate.cfg.xml配置
- hibernate.cfg.xml配置
- Hibernate.cfg.xml 配置
- 由 ORA-01536: space quota exceeded for tablespace 引出的研究
- delete a NULL pointer is safe
- android语音识别demo
- Win32消息
- 使用 rsync 参数及设置
- Hibernate.cfg.xml相关的参数配置
- 解决:No module named site
- ZooKeeper系列之一:ZooKeeper简介
- JAVA实现大数加法
- iframe自適應高度
- NewsStand书架效果(精选)
- C++中禁止类被派生的方法
- android&&ScaleType
- pragma详解