宋子宪博客

Szx

Consider defining a bean of type 'com.xxx.xxx' in your configuration.解决方法
启动spring boot项目报错Consider defining a bean of type 'com.xx...
扫描右侧二维码阅读全文
23
2019/09

Consider defining a bean of type 'com.xxx.xxx' in your configuration.解决方法

启动spring boot项目报错

Consider defining a bean of type 'com.xxx.xxx.xxx' in your configuration.

正常情况下@Component注解的类会自动被Spring扫描到生成Bean注册到spring容器中,如果系统提升找不到,也就是该注解被没有被spring识别,问题的核心关键就在application类的注解SpringBootApplication上
解决方法,在启动类上加上这个注解即可

@EnableFeignClients

Consider defining a bean of type 'com.xxx.xxx' in your configuration.解决方法.png

Last modification:September 23rd, 2019 at 04:48 am
如果觉得这篇技术文章对您有帮助,可以请博主喝一杯饮料

Leave a Comment