Sql Server数据库的hibernate连接设置

<!--驱动程序-->

<property name="connection.driver_class">net.sourceforge.jtds.jdbc.Driver</property>

<!-- JDBC URL -->

<property name="connection.url">jdbc:jtds:sqlserver://localhost:1433;DatabaseName=dbname</property>

<!-- 数据库用户名-->

<property name="connection.username">sa</property>

<!-- 数据库密码-->

<property name="connection.password"></property>


上例的驱动类使用的是jtds的驱动类,因此读者需要将jtds的jar包(eg. jtds-1.2.jar)加入到classpath中。

http://commons.apache.org/dbcp/changes-report.html#1.3
最新dbcp

你可能感兴趣的:(apache,sql,Hibernate,SQL Server,jdbc)