如何在运行Spring Boot应用程序时显示自动配置报告

时间:2017-11-03 17:50:13

标签: java spring-boot intellij-idea

  

启动ApplicationContext时出错。显示自动配置   报告在启用“debug”的情况下重新运行您的应用程序

当我尝试运行Spring Boot应用程序时,我收到了上述消息。

有没有人知道如何在启用'debug'的情况下重新运行应用程序?

我在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

4 个答案:

答案 0 :(得分:32)

在您的properties / yml中设置debug = truedebug: true。它也可以作为参数传递--debug

答案 1 :(得分:14)

在运行/调试配置中,选中“启用调试输出”

enter image description here

答案 2 :(得分:3)

在配置属性时,您可以在common-application-properties中引用许多属性。

# ----------------------------------------
# CORE PROPERTIES
# ----------------------------------------
debug=false # Enable debug logs.
trace=false # Enable trace logs.

答案 3 :(得分:0)

在应用程序的YAML /设置文件中将logging.level.org.springframework.boot.autoconfigure属性设置为DEBUG。这样就足够了。

相关问题