我的spring配置:
<?xml version= "1.0 " encoding= "UTF-8 "?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN " "http://www.springframework.org/dtd/spring-beans.dtd ">
<beans>
<bean id= "dataSource "
class= "org.springframework.jdbc.datasource.DriverManagerDataSource ">
<property name= "driverClassName ">
<value> com.microsoft.jdbc.sqlserver.SQLServerDriver </value>
</property>
<property name= "url ">
<value> jdbc:microsoft:sqlserver://localhost:1433;databaseName=student </value>
</property>
<property name= "username ">
<value> sa </value>
</property>
</bean>
<bean id= "sessionFactory "
class= "org.springframework.orm.hibernate3.LocalSessionFactoryBean " destroy-method= "close ">
<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 "> true </prop>
</props>
</property>
<property name= "mappingResources ">
<list>
<value> bean/Student.hbm.xml </value>
</list>
</property>
</bean>
<bean id= "userDAO " class= "model.UserDAO ">
<property name= "sessionFactory ">
<ref bean= "sessionFactory "/>
</property>
</bean>
<bean id= "transactionManager "
class= "org.springframework.orm.hibernate3.HibernateTransactionManager ">
<property name= "sessionFactory ">
<ref bean= "sessionFactory "/>
</property>
</bean>
<bean id= "userDAOProxy " class= "org.springframework.transaction.interceptor.TransactionProxyFactoryBean ">
<property name= "transactionManager ">
<ref bean= "transactionManager "/>
</property>
<property name= "proxyInterfaces ">
<list>
<value> model.IUserDAO </value>
</list>
</property>
<property name= "target ">
<ref local= "userDAO "/>
</property>
<property name= "transactionAttributes ">