java 使用hibernate访问sqlserver如何配置hibernate.cfg.xml

来源:互联网 发布:简述信息和数据的关系 编辑:程序博客网 时间:2024/06/05 06:01
<?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"><!-- Generated by MyEclipse Hibernate Tools.                   --><hibernate-configuration>    <session-factory>        <property name="show_sql">true</property>                       <property name="connection.url">jdbc:sqlserver://localhost:1433;DatabaseName=BookInfo</property>        <property name="connection.username">sa</property>        <property name="connection.password">123</property>        <property name="connection.driver_class">com.microsoft.sqlserver.jdbc.SQLServerDriver</property>                <property name="dialect">org.hibernate.dialect.SQLServerDialect</property>                </session-factory></hibernate-configuration>

原创粉丝点击