hibernate.cfg.xml 博客分类: hibernate HibernateXMLJDBCSQLMicrosoft
程序员文章站
2024-02-03 13:09:46
...
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> <hibernate-configuration> <session-factory> <!--sql链接地址和默认的数据库名--> <property name="connection.url">jdbc:sqlserver://172.168.16.23:1433;databaseName=xgerp</property> <!--sql用户名--> <property name="connection.username">sa</property> <!--密码--> <property name="connection.password">xgerp</property> <!--jdbc驱动--> <property name="connection.driver_class">com.microsoft.sqlserver.jdbc.SQLServerDriver</property> <property name="dialect">org.hibernate.dialect.SQLServerDialect</property> <property name="show_sql">true</property> <property name="current_session_context_class">thread</property> <mapping class="com.xuguang.ext.xgerp.comm.workshop.bean.WorkShop"/> </session-factory> </hibernate-configuration>