为了账号安全,请及时绑定邮箱和手机立即绑定

SpringBoot使用JdbcTemplate 项目启动报错:

SpringBoot使用JdbcTemplate 项目启动报错:

慕莱坞森 2019-04-18 18:15:36
报错详情:Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.2019-03-13 15:31:51.932 ERROR 31060 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :APPLICATION FAILED TO STARTDescription:Field jdbcTemplate in com.lmy.demo.service.UserService required a bean of type 'org.springframework.jdbc.core.JdbcTemplate' that could not be found.The injection point has the following annotations:- @org.springframework.beans.factory.annotation.Autowired(required=true)Action:Consider defining a bean of type 'org.springframework.jdbc.core.JdbcTemplate' in your configuration.
查看完整描述

4 回答

?
慕斯王

TA贡献1864条经验 获得超2个赞

保存,重启项目,有没有,然后看spring配置文件中有没有配dataSource的用户名秘密什么的

查看完整回答
反对 回复 2019-05-14
?
天涯尽头无女友

TA贡献1831条经验 获得超9个赞

定义了吗,如果定义了,是不是没有定义扫描那个包


查看完整回答
反对 回复 2019-05-14
?
拉莫斯之舞

TA贡献1820条经验 获得超10个赞

包,注解以及配置文件看一下jdbc链接池的配置是否正确


查看完整回答
反对 回复 2019-05-14
  • 4 回答
  • 0 关注
  • 6311 浏览

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号