Hibernate中hibernate.cfg.xml核心配置文件配置
来源:互联网 发布:近年来重庆物流数据 编辑:程序博客网 时间:2024/04/30 19:30
<property>行为标签,name需要操作的对象
//dialect表示数据库的方言,例org.hibernate.dialect.MySQLDialect
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
//connection.url表示数据库连接的位置
<property name="connection.url">jdbc:mysql://localhost:3306/news</property>
//connection.username表示数据库连接用户名
<property name="connection.username">root</property>
//connection.password表示数据库连接密码
<property name="connection.password">root</property>
//connection.driver_class数据库连接驱动
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
//myeclipse.connection.profile是数据库连接的名字
<property name="myeclipse.connection.profile">news</property><property name="show_sql">true</property> //控制台输出sql语句
<property name="format_sql">true</property>//sql语句按一定的格式输出
<property name="hbm2ddl.auto">create</property>//操作数据库的策略,如create(先drop)、update(更新)
//以下是连接hbm.xml文件
<mapping resource="com/demo/bean/Students.hbm.xml" /><mapping resource="com/demo/bean/Teacher.hbm.xml"/>
0 0
- Hibernate中hibernate.cfg.xml核心配置文件配置
- Hibernate-02-核心配置文件Hibernate.cfg.xml
- Hibernate -- hibernate.cfg.xml 核心配置文件
- Hibernate配置文件hibernate.cfg.xml中配置信息详解
- Hibernate中配置文件hibernate.cfg.xml详解
- Hibernate学习-08:配置-核心配置文件hibernate.cfg.xml、映射文件*.hbm.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配置文件--hibernate.cfg.xml
- Hibernate配置文件hibernate.cfg.xml
- Hibernate-配置文件-hibernate.cfg.xml
- Kali-linux安装更新
- 数据结构之时间.空间复杂度分析
- 一份比较好用的vim配置文件
- Appium - Android windows测试环境搭建
- hadoop NN元数据管理机制
- Hibernate中hibernate.cfg.xml核心配置文件配置
- JavaScript 变量、作用域和内存问题
- 面向对象_工具类中使用静态
- Oracle中创建dblink的方法
- 二分查找或插入
- android中确定键重复点击,却只想在时间内,只显示点击一次
- 158.Two Strings Are Anagrams-两个字符串是变位词(容易题)
- Appium 基础概念
- 新开始,java基础小结