Class MonitoredMicroserviceEnvironmentPostProcessor
java.lang.Object
com.nmontytskyi.monitoring.starter.env.MonitoredMicroserviceEnvironmentPostProcessor
- All Implemented Interfaces:
org.springframework.boot.env.EnvironmentPostProcessor
public class MonitoredMicroserviceEnvironmentPostProcessor
extends Object
implements org.springframework.boot.env.EnvironmentPostProcessor
Registers
MonitoredMicroservice annotation attributes as the lowest-priority
PropertySource in the application environment.
Running as an EnvironmentPostProcessor guarantees the values are present
before any @ConditionalOnProperty, @ConfigurationProperties binding,
or @Scheduled fixedDelay resolution takes place.
Any application.yml key under the monitoring.* prefix naturally overrides
the annotation value because YAML property sources have higher precedence.
Registered via META-INF/spring.factories.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidpostProcessEnvironment(org.springframework.core.env.ConfigurableEnvironment environment, org.springframework.boot.SpringApplication application)
-
Constructor Details
-
MonitoredMicroserviceEnvironmentPostProcessor
public MonitoredMicroserviceEnvironmentPostProcessor()
-
-
Method Details
-
postProcessEnvironment
public void postProcessEnvironment(org.springframework.core.env.ConfigurableEnvironment environment, org.springframework.boot.SpringApplication application) - Specified by:
postProcessEnvironmentin interfaceorg.springframework.boot.env.EnvironmentPostProcessor
-