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 Details

    • BINDING_FLATTENED_PROPERTY_SOURCE_NAME

      public static final String BINDING_FLATTENED_PROPERTY_SOURCE_NAME
      See Also:
  • Constructor Details

    • BindingFlattenedEnvironmentPostProcessor

      public BindingFlattenedEnvironmentPostProcessor()
      Creates a new instance of BindingFlattenedEnvironmentPostProcessor using the Bindings available in the environment.
  • 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