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

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下载

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

公众号

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