Spring中数据源的使用

 使用数据源进行数据库插入,删除,更新等操作

 jdbc.properties

读取配置文件中的内容,然后配置相关数据源
 applicationContext.xml:

Student.java



 注入JdbcTemplate,然后进行相关数据库操作

 stuDao.java


 
 TestDemo.java:

 

 

猜你喜欢

转载自znland.iteye.com/blog/2228144