配置文件

<!-- SQL Server 配置 -->
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName">
<value>com.microsoft.jdbc.sqlserver.SQLServerDriver</value>
</property>
<property name="url">
<value>jdbc:microsoft:sqlserver://127.0.0.1:1433;DatabaseName=hyweb;SelectMethod=cursor</value>
</property>
<property name="username">
<value>sa</value>
</property>
<property name="password">
<value>sa</value>
</property>
</bean>
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref bean="dataSource" />
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
org.hibernate.dialect.SQLServerDialect
</prop>
<prop key="hibernate.show_sql">false</prop>
</props>
</property>
<property name="mappingDirectoryLocations">
<list>
<value>classpath:/hibernatexml</value>
</list>
</property>
</bean>

作者: fanyirong5555   发布时间: 2011-06-09

你想问什么

作者: HF2905330   发布时间: 2011-06-09

是不是连不上库

作者: lovemichael2   发布时间: 2011-06-09

帮顶...

作者: threeswordmin9   发布时间: 2011-06-09