1.在springboot中同时使用jdbcTemplate和Jpa的时候,项目启动报错,错误信息为:
(The bean 'userRepository', defined in null, could not be registered. A bean with that name has already been defined in null and overriding is disabled.)
2.截图如下:
3.网上搜索多种办法未能解决,最后仔细阅读pom.xml,发现,jdbc的依赖引入错误,我引入的是
正确的依赖是:
更换后重新启动,恢复正常!