Polish "Order ExitCodeGenerators and return first non-zero exit code"
See gh-30457
This commit is contained in:
@@ -354,8 +354,10 @@ include::code:MyApplication[]
|
||||
Also, the `ExitCodeGenerator` interface may be implemented by exceptions.
|
||||
When such an exception is encountered, Spring Boot returns the exit code provided by the implemented `getExitCode()` method.
|
||||
|
||||
If several `ExitCodeGenerator` are registered in a `ExitCodeGenerators`, they can be called in a specific order by using `org.springframework.core.annotation.Order` annotation or by implementing `org.springframework.core.Ordered`,
|
||||
and `ExitCodeGenerators#getExitCode()` will return the first non-zero value.
|
||||
If there is more than `ExitCodeGenerator`, the first non-zero exit code that is generated is used.
|
||||
To control the order in which the generators are called, additionally implement the `org.springframework.core.Ordered` interface or use the `org.springframework.core.annotation.Order` annotation.
|
||||
|
||||
|
||||
|
||||
[[features.spring-application.admin]]
|
||||
=== Admin Features
|
||||
|
||||
Reference in New Issue
Block a user