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 Details

    • BINDING_SPECIFIC_PROPERTY_SOURCE_NAME

      public static final String BINDING_SPECIFIC_PROPERTY_SOURCE_NAME
      The name of the PropertySource created by the BindingsEnvironmentPostProcessor: "kubernetesServiceBindingSpecific".
      See Also:
  • Constructor Details

    • BindingSpecificEnvironmentPostProcessor

      public BindingSpecificEnvironmentPostProcessor()
      Creates a new instance of BindingSpecificEnvironmentPostProcessor using the Bindings available in the environment and the BindingsPropertiesProcessors registered with SpringFactoriesLoader.
  • Method Details

    • getOrder

      public int getOrder()
      Specified by:
      getOrder in interface org.springframework.core.Ordered
    • onApplicationEvent

      public void onApplicationEvent(org.springframework.boot.context.event.ApplicationPreparedEvent event)
      Specified by:
      onApplicationEvent in interface org.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:
      postProcessEnvironment in interface org.springframework.boot.env.EnvironmentPostProcessor