zoukankan      html  css  js  c++  java
  • hibernate常用配置

    连接mysql数据库配置:


    <?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">
    
    <hibernate-configuration>
    	<session-factory>
    		<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
    		<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/struts2_spring_hibernate_2</property>
    		<property name="hibernate.connection.username">root</property>
    		<property name="hibernate.connection.password"></property>
    		<property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
    		<property name="hibernate.hbm2ddl.auto">update</property>
    		
    		<property name="show_sql">true</property>
    		
    		
    		<mapping resource="com/bjpowernode/hibernate/Student.hbm.xml"/>
    		<mapping resource="com/bjpowernode/hibernate/Classes.hbm.xml"/>
    	</session-factory>
    </hibernate-configuration>


  • 相关阅读:
    初识python
    文件操作
    初识python
    pycharm IDE
    初识python
    初识Python
    python之网络编程-多线程
    python之并发编程-进程之间的通信
    python之并发编程-多进程
    python之并发编程-操作系统
  • 原文地址:https://www.cnblogs.com/reblue520/p/6239919.html
Copyright © 2011-2022 走看看