Class BindingFlattenedEnvironmentPostProcessor
java.lang.Object
org.springframework.cloud.bindings.boot.BindingFlattenedEnvironmentPostProcessor
- All Implemented Interfaces:
EventListener,org.springframework.boot.env.EnvironmentPostProcessor,org.springframework.context.ApplicationListener<org.springframework.boot.context.event.ApplicationPreparedEvent>,org.springframework.core.Ordered
public final class BindingFlattenedEnvironmentPostProcessor
extends Object
implements org.springframework.context.ApplicationListener<org.springframework.boot.context.event.ApplicationPreparedEvent>, org.springframework.boot.env.EnvironmentPostProcessor, org.springframework.core.Ordered
An implementation of
EnvironmentPostProcessor that generates properties from Bindings with a
flattened format: k8s.bindings.{name}.*.-
Field Summary
FieldsFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance ofBindingFlattenedEnvironmentPostProcessorusing theBindingsavailable in the environment. -
Method Summary
Modifier and TypeMethodDescriptionintgetOrder()voidonApplicationEvent(org.springframework.boot.context.event.ApplicationPreparedEvent event) voidpostProcessEnvironment(org.springframework.core.env.ConfigurableEnvironment environment, org.springframework.boot.SpringApplication application)
-
Field Details
-
BINDING_FLATTENED_PROPERTY_SOURCE_NAME
- See Also:
-
-
Constructor Details
-
BindingFlattenedEnvironmentPostProcessor
public BindingFlattenedEnvironmentPostProcessor()Creates a new instance ofBindingFlattenedEnvironmentPostProcessorusing theBindingsavailable in the environment.
-
-
Method Details
-
getOrder
public int getOrder()- Specified by:
getOrderin interfaceorg.springframework.core.Ordered
-
onApplicationEvent
public void onApplicationEvent(org.springframework.boot.context.event.ApplicationPreparedEvent event) - Specified by:
onApplicationEventin interfaceorg.springframework.context.ApplicationListener<org.springframework.boot.context.event.ApplicationPreparedEvent>
-
postProcessEnvironment
public void postProcessEnvironment(org.springframework.core.env.ConfigurableEnvironment environment, org.springframework.boot.SpringApplication application) - Specified by:
postProcessEnvironmentin interfaceorg.springframework.boot.env.EnvironmentPostProcessor
-