你好,游客 登录 注册 搜索
背景:
阅读新闻

Hibernate数据模型导出工具类

[日期:2012-12-13] 来源:Linux社区  作者:yingjiebohe [字体:大 中 小]

Hibernate核心配置文件详细解析提供一个链接:http://www.linuxidc.com/Linux/2012-12/75962.htm

<!DOCTYPE hibernate-configuration PUBLIC
 "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
 "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

<hibernate-configuration>
 <session-factory >
    <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
    <properyt name="hibernate.connection.url">jdbc:mysql://localhost:3306/hibernate_first</properyt>
    <property name="hibernate.connection.username">root</property>
    <property name="hibernate.connection.password">bjpowernode</property>
    <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
    <property name="hibernate.show_sql">true</property>
    <property name="hibernate.format_sql">true</property>
   
    <!-- 具体映射文件 -->
    <mapping resource="com/bjpowernode/hibernate/User.hbm.xml"/>
   
 </session-factory>
</hibernate-configuration>

Hibernate的映射流程大概就是

实体类(.class)--->实体类映射文件(xx.hbm.xml)--->hibernate核心配置文件(hibernate.cfg.xml)

--->数据库导出工具(DBExport)依赖于SchemaExport类

linux
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款