zoukankan      html  css  js  c++  java
  • Hibernate基础(一)

    Hibernate是ORM开源组件

    源码:http://sourceforge.net/projects/hibernate/

    1.Hibernate的配置文件.

    默认配置文件: hibernate.cfg.xml

    前期准备文件:hibernate.properties

    其两个文件的开源项目文件夹的路径:hibernate-release-x.x.xprojectetc

    hibernate.cfg.xml文件的源码

    <!--
      ~ Hibernate, Relational Persistence for Idiomatic Java
      ~
      ~ License: GNU Lesser General Public License (LGPL), version 2.1 or later.
      ~ See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
      -->
    <!DOCTYPE hibernate-configuration PUBLIC
        "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
        "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
    
    <hibernate-configuration>
        <session-factory name="foo">
            <property name="dialect">org.hibernate.dialect.MySQLDialect</property>
            <property name="connection.driver_class">com.mysql.jdbc.Driver</property>
            <property name="connection.url">jdbc:mysql:///test</property>
            <property name="connection.username">xx</property>
            <property name="connection.password">xx</property>
        </session-factory>
    </hibernate-configuration>
  • 相关阅读:
    Django中的request对象和response对象(简单整理)
    Django基础--视图和URL配置
    javascript
    面向对象-01
    JS学习笔记
    云计算基础
    三种网络模式解析
    爬虫小问题
    http协议
    Django之WEB应用
  • 原文地址:https://www.cnblogs.com/nidongde/p/5141651.html
Copyright © 2011-2022 走看看