hibernate.cfg.xml配置
来源:互联网 发布:泰拉瑞亚骸骨魔弓数据 编辑:程序博客网 时间:2024/05/16 13:54
一、常用配置:
hibernate.cfg.xml
<?xmlversion="1.0"encoding="UTF-8"?>
<!DOCTYPEhibernate-configurationPUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<!-- 配置会话属性 -->
<session-factory>
<!-- 以下属性根据所要连接的数据库进行配置 -->
<propertyname="myeclipse.connection.profile">com.mysql.jdbc.MySqlDriver</property>
<propertyname="hibernate.connection.username">root</property>
<propertyname="hibernate.connection.password">root</property>
<propertyname="hibernate.connection.url">jdbc:mysql://localhost:3306/spring_demo?useUnicode=true&characterEncoding=utf-8</property>
<propertyname="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<propertyname="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
<propertyname="hibernate.show_sql">true</property>
<propertyname="hibernate.hbm2ddl.auto">validate</property>
<propertyname="dialect">org.hibernate.dialect.MySQLDialect</property>
<!-- 在下面添加实体关系映射文件 -->
<mappingresource="com/demo/spring/entity/User.hbm.xml"/>
</session-factory>
</hibernate-configuration>
阅读全文
0 0
- 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配置
- 配置hibernate.cfg.xml
- hibernate.cfg.xml配置
- hibernate.cfg.xml配置
- hibernate.cfg.xml 配置
- hibernate hibernate.cfg.xml配置
- hibernate.cfg.xml配置总结
- Hibernate.cfg.xml的配置
- Hibernate.cfg.xml的配置
- hibernate.cfg.xml基本配置
- G
- 【RMQ】nyoj-119 士兵杀敌(三)
- 第一天:Mat类基础
- HDU 6053 TrickGCD(分块+容斥)——2017 Multi-University Training Contest
- spring-boot--使用thymeleaf模板
- hibernate.cfg.xml配置
- 迷宫 FZU
- ReLu(Rectified Linear Units)激活函数
- 谈谈 ES6 的 Promise 对象
- 建筑设计与施工VS软件设计与编程
- HADOOP(1)__Mapreduce_WordCount统计单词数
- android跨进程通信(IPC):使用AIDL
- HDU2838 Cow Sorting (树状数组)
- 获取a+b字符串输入 执行a+b运算