web-dev-qa-db-ja.com

Spring Bootアプリケーションの実行時に自動構成レポートを表示する方法

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
28
robbie70

Properties/ymlでdebug = trueまたはdebug: trueを設定します。引数--debugとして渡すこともできます。

39
Darren Forsythe

実行/デバッグ構成で「デバッグ出力を有効にする」をチェックします

enter image description here

20
FBH

プロパティを設定するときに common-application-properties で参照できるプロパティがたくさんあります。

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

アプリケーションのYAML/settingsファイルでlogging.level.org.springframework.boot.autoconfigureプロパティをDEBUGに設定します。これで十分でしょう。

1
Lu55