Improve startup error message
This commit improves the startup error message so that it does not reference `--debug` anymore. Such command-line switch only works when the application is started using `java -jar`. The error message now refers directly to a section of the documentation that provides more details and links to more useful examples. Closes gh-6593
This commit is contained in:
@@ -46,6 +46,11 @@ When your application starts you should see something similar to the following:
|
||||
By default `INFO` logging messages will be shown, including some relevant startup details
|
||||
such as the user that launched the application.
|
||||
|
||||
|
||||
|
||||
[boot-features-startup-failure]
|
||||
=== Startup failure
|
||||
|
||||
If your application fails to start, registered `FailureAnalyzers` get a chance to provide
|
||||
a dedicated error message and a concrete action to fix the problem. For instance if you
|
||||
start a web application on port `8080` and that port is already in use, you should see
|
||||
@@ -69,6 +74,20 @@ something similar to the following:
|
||||
NOTE: Spring Boot provides numerous `FailureAnalyzer` implementations and you can
|
||||
<<howto.adoc#howto-failure-analyzer,add your own>> very easily.
|
||||
|
||||
If no failure analyzers are able to handle the exception, you can still display the full
|
||||
auto-configuration report to better understand what went wrong. To do so you need to
|
||||
<<#boot-features-external-config,enable the `debug` property>> or
|
||||
<<#boot-features-custom-log-levels,enable `DEBUG` logging>> for
|
||||
`org.springframework.boot.autoconfigure.logging.AutoConfigurationReportLoggingInitializer`.
|
||||
|
||||
For instance, if you are running your application using `java -jar` you can enable the
|
||||
`debug` property as follows:
|
||||
|
||||
[indent=0,subs="attributes"]
|
||||
----
|
||||
$ java -jar myproject-0.0.1-SNAPSHOT.jar --debug
|
||||
----
|
||||
|
||||
|
||||
|
||||
[[boot-features-banner]]
|
||||
|
||||
Reference in New Issue
Block a user