spring-boot项目启动抛这个错,网上貌似没有同类型的错误

娄宇 发布于 2017/08/24 09:20
阅读 329
收藏 0

 Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'envInfoContributor' defined in class path resource [org/springframework/boot/actuate/autoconfigure/InfoContributorAutoConfiguration.class]: Unsatisfied dependency expressed through method 'envInfoContributor' parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.core.env.ConfigurableEnvironment' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}

加载中
0
CodeZero
CodeZero

错误信息里面不是说得很明白了吗,NoSuchBeanDefinitionException,你是不是通过@Configuration来创建@Bean ,然后注入了ConfigurableEnvironment这个Bean啊,初始化的时候找不到这个Bean,

返回顶部
顶部