idea2020.1版本
![](https://i-blog.csdnimg.cn/blog_migrate/1d2af9dab448762abd45f53edfbec4e7.png)
参考https://blog.csdn.net/weixin_47331155/article/details/121890957
参考https://blog.csdn.net/qq_43658309/article/details/126322250
https://blog.csdn.net/m0_58347801/article/details/127611621
https://blog.csdn.net/weixin_43510522/article/details/96897303
https://blog.csdn.net/weixin_44426216/article/details/109356554
这里报错
@Autowired
private NamedParameterJdbcTemplate jdbcTemplate;
改成setter注入后能用了
private NamedParameterJdbcTemplate jdbcTemplate;
public NamedParameterJdbcTemplate getJdbcTemplate() {
return jdbcTemplate;
}
@Autowired
public void setJdbcTemplate(NamedParameterJdbcTemplate jdbcTemplate) {
this.jdbcTemplate = jdbcTemplate;
}