[英]How to display auto-configuration report when running a Spring Boot application
启动 ApplicationContext 时出错。 要显示自动配置报告,请在启用“调试”的情况下重新运行您的应用程序
当我尝试运行 Spring Boot 应用程序时收到上述消息。
有谁知道如何在启用“调试”的情况下重新运行应用程序?
我正在 Intellij 中运行该应用程序(版本 2016.1.2)
我的跑步者课程如下所示,
@Slf4j
@EnableIntegration
@EnableLoaderApplication
@SpringBootApplication
public class LoaderApplicaton {
public static void main(final String[] args) {
SpringApplication.run(LoaderApplicaton.class, args);
}
}
针对 Darren 在下面的回答,我修改了我的 properties.yml 文件如下,并生成了自动配置报告,
debug: true
spring:
application:
name: xxxMyLoaderApp
cloud:
config:
uri: http://my-host.address.com:8761/config
在您的属性/yml 中设置debug = true
或debug: true
。 它也可以作为参数传递--debug
。
Spring Boot 文档中提供了有关调试标志功能的更多详细信息。
在配置属性时,您可以在common-application-properties 中引用许多属性。
# ----------------------------------------
# CORE PROPERTIES
# ----------------------------------------
debug=false # Enable debug logs.
trace=false # Enable trace logs.
在应用程序的 YAML/设置文件中将logging.level.org.springframework.boot.autoconfigure
属性设置为DEBUG
。 这样就足够了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.