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

项目启动不了

***************************

APPLICATION FAILED TO START

***************************


Description:


Field itemService in com.miaoshaproject.controller.ItemController required a bean of type 'com.miaoshaproject.service.ItemService' 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 'com.miaoshaproject.service.ItemService' in your configuration.


正在回答

4 回答

在ItemServiceImpl中开头那添加@Service(对照着UserServiceImpl修改)

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

定位到错误了,查看了所有扫包配置都发现没问题,都就是一直报注入失败,最后有错误提示是xml映射文件的问题,可能是在自动生成mapper映射文件是里面的内容会重复,进去看的时候看到很多名称有红线,把重复的删掉就行了

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

一样项目启动不了~一直报注入失败

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

https://img1.sycdn.imooc.com//5d07330600011a8a08650180.jpg

APP启动类是这样的

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

举报

0/150
提交
取消

项目启动不了

我要回答 关注问题
微信客服

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

帮助反馈 APP下载

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

公众号

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