zoukankan      html  css  js  c++  java
  • hibernate配置详情1(hibernate.cfg.xml)

    <!DOCTYPE hibernate-configuration PUBLIC
    	"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
    	"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
    
    
    <hibernate-configuration>
    	<session-factory name="foo">
    	<!--数据库连接配置4项  -->
    		<!-- 数据库连接字符串 -->
    		<property name="connection.url">jdbc:oracle:thin:@127.0.0.1:1521:orcl</property>
    		<!-- 数据库用户名 -->
    		<property name="connection.username">scott</property>
    		<!-- 数据库密码-->
    		<property name="connection.password">tiger</property>
    		<!-- 数据库连接驱动-->
    		<property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
    		<!--数据库方言(数据类型的配置)  -->
    		<property name="dialect">org.hibernate.dialect.Oracle10gDialect</property>
    		<!--数据库相关配置  -->
    		<property name="show_sql">true</property>
    		<!--格式化  -->
    		<property name="format_sql">true</property>
    		<!--映射,有几张表就配置几个映射  -->
    		<mapping resource="org/hibernate_one/entity/Dept.hbm.xml"/>
    		
    	</session-factory>
    </hibernate-configuration>

  • 相关阅读:
    python 上传下载文件
    post方式加载iframe
    js 实现打印功能
    python 判断数据类型
    web样式无法正常显示
    C# 调用python
    PDF转换成Txt
    js预览PDF的插件(亲测支持IE9,火狐,等等)
    文件下载
    asp.net网站发布到服务器GET的技能
  • 原文地址:https://www.cnblogs.com/a1111/p/7459785.html
Copyright © 2011-2022 走看看