zoukankan      html  css  js  c++  java
  • hibernate正向生成数据库表以及配置——hibernate.cfg.xml

    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE hibernate-configuration PUBLIC
              "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
              "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
    
    <!-- Generated by MyEclipse Hibernate Tools.                   -->
    <hibernate-configuration>
    
        <session-factory>
            <property name="dialect">org.hibernate.dialect.Oracle9Dialect</property>
            <property name="connection.url">jdbc:oracle:thin:@127.0.0.1:1521:orcl</property>
            <property name="connection.username">student</property>
            <property name="connection.password">student</property>
            <property name="current_session_context_class">thread</property>
            <property name="connection.driver_class">oracle.jdbc.OracleDriver</property>
            <property name="myeclipse.connection.profile">student</property>
            <!--显示sql语句  -->
            <property name="show_sql">true</property>
            <property name="format_sql">true</property>
            <!--自动创建表  -->
          	<!--<property name="hbm2ddl.auto">create</property>-->
            <!--映射文件  -->
            <mapping
    			resource="cn/bdqn/studentInfo/entity/Student.hbm.xml" />
    		<mapping
    			resource="cn/bdqn/studentInfo/entity/Teacher.hbm.xml" />
        </session-factory>
    
    </hibernate-configuration>

  • 相关阅读:
    蒙版
    雪碧图
    用html来设置一个用户登录网页
    用vs来实现反序输出的效果
    用vs来写一段判断是不是水仙花数的代码
    Node.js使用Sequelize操作MySQL
    修改 xampp 默认端口号
    TCP/IP详解学习笔记(1)基本概念
    CSS常用标签
    Linux 系统中 sudo 命令的 10 个技巧
  • 原文地址:https://www.cnblogs.com/a1111/p/12816374.html
Copyright © 2011-2022 走看看