0
点赞
收藏
分享

微信扫一扫

解决Consider defining a bean of type ‘com.abc.gmallpublisher1.service.ProductStatsService‘ in your con

雷亚荣 2022-02-19 阅读 47
spring

BUG:

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2022-02-19 13:24:32.423 ERROR 68476 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION FAILED TO START
***************************

Description:

Field productStatsService in com.abc.gmallpublisher1.controller.SugarController required a bean of type 'com.abc.gmallpublisher1.service.ProductStatsService' 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.abc.gmallpublisher1.service.ProductStatsService' in your configuration.

原因:在ProductStatsService里的实现类,没有写@Service注释

解决方法:加@Service注释 

举报

相关推荐

0 条评论