学习了:http://www.cnblogs.com/amwicfai/p/3181003.html
beans.xml中的配置写法:
<!-- 数据源 --> <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="driverClassName" value="com.microsoft.sqlserver.jdbc.SQLServerDriver"></property> <property name="url" value="jdbc:sqlserver://127.0.0.1:1433;databaseName=a; catalogName=a"></property> <property name="username" value="a"></property> <property name="password" value="a"></property> </bean>