当前位置:   article > 正文

SpringBoot项目启动时报APPLICATION FAILED TO START

SpringBoot项目启动时报APPLICATION FAILED TO START

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

Description:

Field configService in com.kangning.web.controller.common.CaptchaController required a bean of type 'com.kangning.system.service.ISysConfigService' 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.kangning.system.service.ISysConfigService' in your configuration.


Process finished with exit code 1
解决办法:

1、根据上面提示ISysConfigService接口中没有定义bean对象

2、我使用的是SpringBoot框架,底层是基于Spring,因此定义bean对象需要使用注解来实现

3、我查看了service实现类,发现业务逻辑层Service层没有定义bean对象,因此我使用@Service对该实现类进行定义

4、最后项目启动成功

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/很楠不爱3/article/detail/342246
推荐阅读
相关标签
  

闽ICP备14008679号