zoukankan      html  css  js  c++  java
  • Hibernate核心配置文件

    src目录下 hibernate.cfg.xml:

     1 <?xml version="1.0" encoding="UTF-8"?>
     2 
     3 <!DOCTYPE hibernate-configuration PUBLIC
     4 
     5     "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
     6 
     7     "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
     8 
     9     <hibernate-configuration>
    10 
    11     <session-factory>
    12 
    13     <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
    14 
    15     <property name="hibernate.connection.url">jdbc:mysql:///hibernate_day03?useUnicode=true&amp;characterEncoding=UTF8</property>
    16 
    17     <property name="hibernate.connection.username">root</property>
    18 
    19     <property name="hibernate.connection.password"></property>
    20 
    21     <property name="hibernate.show_sql">true</property>
    22 
    23     <property name="hibernate.format_sql">true</property>
    24 
    25     <property name="hibernate.hbm2ddl.auto">update</property>
    26 
    27     <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
    28 
    29     <mapping resource="cn/cuibin/entity/Customer.hbm.xml"/>
    30 
    31     <mapping resource="cn/cuibin/entity/LinkMan.hbm.xml"/>
    32 
    33     </session-factory>
    34 
    35     </hibernate-configuration>
  • 相关阅读:
    Mybatis(spring)(多个参数)(插入数据返回id)
    乱码的情况
    struts2常用类型的Result
    struts2中的session使用
    linux查看端口占用程序
    webservice笔记
    Java读文件夹
    JSON笔记
    about Base64
    【转载】MyEclipse6.5 KeyGen
  • 原文地址:https://www.cnblogs.com/cuibin/p/6708276.html
Copyright © 2011-2022 走看看