Hibernate5的hibernate.cfg.xml基本配置
来源:互联网 发布:软件开发图片 编辑:程序博客网 时间:2024/05/20 23:58
<?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> <!-- DB连接四要素 --> <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property> <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/hibernate5</property> <property name="hibernate.connection.username">root</property> <property name="hibernate.connection.password">root</property> <!-- 方言 --> <property name="hibernate.dialect">org.hibernate.dialect.MySQL5Dialect</property> <!--C3P0 数据源(数据库连接池) --> <!--<property name="hibernate.connection.provider_class">org.hibernate.c3p0.internal.C3P0ConnectionProvider</property>--> <!-- 当前Session上下文 --> <property name="hibernate.current_session_context_class">thread</property> <!-- 自动建表 --> <property name="hibernate.hbm2ddl.auto">update</property> <!-- 显示SQL --> <property name="hibernate.show_sql">true</property> <!-- 格式化SQL --> <property name="hibernate.format_sql">true</property> <!-- 注册映射文件 --> <!--<mapping resource="com/luo/beans/Student.hbm.xml"/>--> <!--package参数无法确定怎么用,知道的朋友可留言--> <mapping package="domain"/> <mapping class="domain.Event"/> </session-factory></hibernate-configuration>
阅读全文
0 0
- Hibernate5的hibernate.cfg.xml基本配置
- hibernate.cfg.xml的基本配置
- hibernate.cfg.xml基本配置
- hibernate 的cfg.xml 和 hbm.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配置
- centos开启telnet服务
- 1Z0-051 37. You issued the following command to drop the PRODUCTS table:
- springMVC工作原理
- leetcode No150. Evaluate Reverse Polish Notation
- dbutils 介绍与使用
- Hibernate5的hibernate.cfg.xml基本配置
- Uva 933 Product of digits
- 熊猫TV技术与直播技术相关
- 有序数组增删改查找
- codevs 1198 NOIP 2012 国王的游戏 高精度 解题报告
- 再看Java泛型
- android 九宫格手势密码 纯代码实现
- static_cast、dynamic_cast、const_cast和reinterpret_cast总结
- 习题5-10 在Web中搜索(Searching the Web, UVa1597)