A compent required a bean of type ‘java.lang.String‘ that could not found
项目启动报错:A compent required a bean of type ‘java.lang.String’ that could not foundspringboot应用启动的时候,bean的加载扫描失败,错误信息如下A component required a bean of type ‘XXX’ that could not be found.开发中遇到这种问题,这是一个很大的坑
·
项目启动报错:A compent required a bean of type ‘java.lang.String’ that could not found
springboot应用启动的时候,bean的加载扫描失败,错误信息如下A component required a bean of type ‘XXX’ that could not be found.
开发中遇到这种问题,这是一个很大的坑,
本项目是一个SpringBoot项目,项目中用到了@Resource注解,但是@Resource下面并没有任何变量和方法,就会引发这个问题
解决:在@Resource下面加入变量或者删除@Resource,反正不要让它空着就行
更多推荐
所有评论(0)