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

Posted G_whang

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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.的主要内容,如果未能解决你的问题,请参考以下文章

springboot Consider defining a bean of type 'xxx' in your configuration

Consider defining a bean of type 'org.springframework.security.authentication.AuthenticationMana

Consider defining a bean of type问题解决

MapStruct - Consider defining a bean of type in your configuration.

Consider defining a bean of type `xxx` in your configuration问题解决问题解决

Spring Boot @Autowired无法注入类 Consider defining a bean of type