项目中新建了一个模块,依赖到另外的一个模块中,通过Springboot启动,然后报错:org.springframework.beans.factory.BeanCreationException
问题描述:
在另外一个模块中写了一个配置类
@Configuration
public class weiXinConfiguration {
}
原因分析:
bean未注入到Factory工厂中,自己手动加了一个@Bean 不管用,清除缓存后也不管用,后来经过分析,在模块中不去扫这个配置类,在主类注解上加exclude
解决方案:
@SpringBootApplication(exclude = {XXXXConfiguration.class})



