zoukankan      html  css  js  c++  java
  • hibernate.cfg.xml配置

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE hibernate-configuration
            PUBLIC "-//hibernate/Hibernate Configurateion DTD 3.0//EN"
        "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
    <hibernate-configuration>
    <!-- xml比peoperty映射更方便 -->
    <!-- SessionFactory配置 -->
        <session-factory>
            <!-- 数据库url -->
            <property name="hibernate.connection.url"  >
                jdbc:sqlserver://localhost:1433;DatabaseName=jx
            </property>
            <!-- 数据库驱动 -->
            <property name="hibernate.connection.driver_class">
                 com.microsoft.sqlserver.jdbc.SQLServerDriver
            </property>
            <!-- 数据库用户名 -->
            <property name="hibernate.connection.username">
                sa
            </property >
            <!-- 数据密码 -->
            <property name="hibernate.connection.password">
                123456
            </property>
        <!--     dialect  -->
        <property name="dialect">
            org.hibernate.dialect.SQLServerDialect
        </property>
        <!-- 是否将运行生成的SQL输出到日志调试 -->
        <property name="hibernate.show_sql">
            True
        </property>
        <property name="javax.persistence.validation.mode">none</property>
    <!--     外连接数据库 -->
    <!--     事务 -->
    <!-- 映射文件配置,配置文件名必须包含其对应的全路径 -->
    <mapping  resource="model/Tuser.hbm.xml"/>
        </session-factory>
    </hibernate-configuration>

  • 相关阅读:
    小量程称重传感器
    一个苹果证书怎么多次使用——导出p12文件
    ios申请真机调试( xcode 5)详细解析
    iOS Developer:真机测试
    mac使用技巧
    How to Create a Provisioning Profile for iPhone
    ios申请真机调试( xcode 5)详细解析
    ui develop
    google ip address
    remove xcode recent projects from dock menu 移除xcode dock菜单显示的项目列表
  • 原文地址:https://www.cnblogs.com/lxh520/p/8061822.html
Copyright © 2011-2022 走看看