Error starting ApplicationContext. To display the conditions report re-run your application with 'de
程序员文章站
2022-01-30 20:47:40
...
SpringBoot启动失败,并报错:Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled.
@SpringBootApplication
@EnableAutoConfiguration(exclude = DataSourceAutoConfiguration.class)
public class MySpringBootApplication {
public static void main(String[] args) {
SpringApplication.run(MySpringBootApplication.class);
}
}
网上的大多解决方法是在启动类上加上:@EnableAutoConfiguration(exclude = DataSourceAutoConfiguration.class),
可能是因为开启了热部署
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId></dependency>
但是解决无效,
这时我去查看了application.yml, yml中的对象配置和@ConfigurationProperties(prefix = “student”)的使用是否正确呢,
我发现配置文件中的对象映射出了问题。
另外,对象需要添加getter和setter方法才能使用
上一篇: 批量、有顺序的更改档名-python
下一篇: Error starting ApplicationContext. To display the conditions report re-run your application。。。。
推荐阅读
-
SpringBoot报错:Error starting ApplicationContext. To display the conditions report...........
-
springboot错误:Error starting ApplicationContext. To display the conditions report re-run your applica
-
ApplicationContext.To display the conditions report re-run your application with ‘debug‘ enabled
-
springboot启动报错,Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
-
Error starting ApplicationContext. To display the conditions report re-run your application with 'de
-
Error starting ApplicationContext. To display the conditions report re-run your application with 'de
-
Error starting ApplicationContext. To display the conditions report re-run your application with 'de
-
Error starting ApplicationContext. To display the conditions report re-run your application with ‘de
-
Error starting ApplicationContext. To display the conditions report re-run your application with 'de
-
ApplicationContext.To display the conditions report re-run your application with ‘debug‘ enabled