1.通过Autowired注入jdbcTemplate,dao类在spring管理中,jdbcTemplate在spring管理中,在dao类上直接通过autowired注入
2.通过property属性注入,dao类在spring管理中,jdbcTemplate在spring管理中,在dao类上添加set方法,在xml文件中配置property属性注入
3.dao类继承JdbcDaoSupport,dao类在spring容器中,给他注入属性DataSource,然后在dao 类中直接使用getTemplate()