,,& lt; !——, Spring jdbcTemplate ——比; ,,,& lt; bean id=癹dbcTemplate”,类=皁rg.springframework.jdbc.core.JdbcTemplate”,抽象=癴alse”,, ,,,,,,,lazy-init=癴alse”,自动装配=澳稀?在,, ,,,,,,,& lt; property name=笆菰础痹?, ,,,,,,,,,,,& lt; ref bean=笆菰础?/在,, ,,,,,,,& lt;/property>,, ,,,& lt;/bean>, ,,,, @RunWith (SpringJUnit4Cla * * * unner.class),, @ContextConfiguration (locations =, {,“classpath *:/资源/springmvc-dao.xml”,}),, @TransactionConfiguration (defaultRollback =, true),, public class  TestSpringJDBC { ,,,, ,,@ autowired ,,,private JdbcTemplate 模板; ,,@Test ,,,public void TestDB (), throws SQLException { ,,,,,,,System.err.println (“template.getDataSource () .getConnection ()=======" + template.getDataSource () .getConnection ()); ,,,} ,,,, ,,@Test ,,,public void queryUsers () { ,,,,,,,String selSQL =皊elect , *,,得到usr_test ”,; ,,,,,,,List, userlist=, (List
春天jdbctemplate操作数据库