springboot- JdbcTemplate

在pom.xml加入jdbcTemplate的依赖 那么只需要在需要使用的类中加入: @Resource private JdbcTemplate jdbcTemplate; 声明dao类为:@Repository,引入JdbcTemplate public Demo getById(long id){ String sql = "select *from Demo where id=?"; Ro
相关文章
相关标签/搜索