Class BindingSpecificEnvironmentPostProcessor
java.lang.Object
org.springframework.cloud.bindings.boot.BindingSpecificEnvironmentPostProcessor
- 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 BindingSpecificEnvironmentPostProcessor
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 delegates properties generation from Bindings.
This implementation generates a single instance of Bindings and then calls all implementations of
BindingsPropertiesProcessor registered with SpringFactoriesLoader allowing them to generate any
properties from the contents of the Bindings.
Must be enabled by setting the org.springframework.cloud.bindings.boot.enable System Property to
true.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe name of thePropertySourcecreated by theBindingsEnvironmentPostProcessor: "kubernetesServiceBindingSpecific".Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance ofBindingSpecificEnvironmentPostProcessorusing theBindingsavailable in the environment and theBindingsPropertiesProcessors registered withSpringFactoriesLoader. -
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_SPECIFIC_PROPERTY_SOURCE_NAME
The name of thePropertySourcecreated by theBindingsEnvironmentPostProcessor: "kubernetesServiceBindingSpecific".- See Also:
-
-
Constructor Details
-
BindingSpecificEnvironmentPostProcessor
public BindingSpecificEnvironmentPostProcessor()Creates a new instance ofBindingSpecificEnvironmentPostProcessorusing theBindingsavailable in the environment and theBindingsPropertiesProcessors registered withSpringFactoriesLoader.
-
-
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
-