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依赖引起的错误,我引入的是
正确的依赖是:
更换后重新启动,恢复正常!
————————————————
版权声明:本文为CSDN博主「Ares_2020」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq_33736234/article/details/102859671