EnvironmentPostProcessor
Allows for customization of the application's Environment prior to the application context being refreshed.
EnvironmentPostProcessor implementations have to be registered in META-INF/spring.factories
, using the fully qualified name of this class as the key. Implementations may implement the Ordered interface or use an @Order annotation if they wish to be invoked in specific order.
Since Spring Boot 2.4, EnvironmentPostProcessor
implementations may optionally take the following constructor parameters:
- DeferredLogFactory - A factory that can be used to create loggers with output deferred until the application has been fully prepared (allowing the environment itself to configure logging levels).
- ConfigurableBootstrapContext - A bootstrap context that can be used to store objects that may be expensive to create, or need to be shared (BootstrapContext or BootstrapRegistry may also be used).
Author
Andy Wilkinson
Stephane Nicoll
Since
1.3.0
Inheritors
Functions
Link copied to clipboard
abstract fun postProcessEnvironment(environment: ConfigurableEnvironment, application: SpringApplication)
Post-process the given
environment
.