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

Description: Field resource in com.imooc.controller.HelloContoller required a bean of type 'com.imocc.pojo.Resource' that could not be found. Action: Consider defining a bean of type 'com.imocc.pojo.Resource' in your configuration.

Description:


Field resource in com.imooc.controller.HelloContoller required a bean of type 'com.imocc.pojo.Resource' that could not be found.



Action:


Consider defining a bean of type 'com.imocc.pojo.Resource' in your configuration.


正在回答

3 回答

在你的主程序前面加上:
@ComponentScan(basePackages= {"com.*"})
意思是扫描com.*包下所有类 若解决,请采纳谢谢。

2 回复 有任何疑惑可以回复我~
#1

weixin_慕九州3547091

解决了牛皮!
2019-10-28 回复 有任何疑惑可以回复我~

启动类放到最外边 https://img1.sycdn.imooc.com//5d4011740001129403040175.jpg

1 回复 有任何疑惑可以回复我~

完全是视频里的代码结果跑不起来,服了


1 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

Description: Field resource in com.imooc.controller.HelloContoller required a bean of type 'com.imocc.pojo.Resource' that could not be found. Action: Consider defining a bean of type 'com.imocc.pojo.Resource' in your configuration.

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信