Class CfEnvironmentPostProcessor

java.lang.Object
io.pivotal.cfenv.spring.boot.CfEnvironmentPostProcessor
All Implemented Interfaces:
CfServiceEnablingEnvironmentPostProcessor, EventListener, org.springframework.boot.env.EnvironmentPostProcessor, ApplicationListener<ApplicationEvent>, Ordered

@Component public class CfEnvironmentPostProcessor extends Object implements CfServiceEnablingEnvironmentPostProcessor, Ordered, ApplicationListener<ApplicationEvent>
An EnvironmentPostProcessor that iterates over CfEnvProcessor implementations to contribute Spring Boot properties for bound Cloud Foundry Services. Implementation of CfEnvProcessorshould be registered using the resources/META-INF/spring.factories property file.
Author:
Mark Pollack, David Turanski
  • Constructor Details

    • CfEnvironmentPostProcessor

      public CfEnvironmentPostProcessor()
  • Method Details

    • getOrder

      public int getOrder()
      Specified by:
      getOrder in interface Ordered
    • setOrder

      public void setOrder(int order)
    • postProcessEnvironment

      public void postProcessEnvironment(ConfigurableEnvironment environment, org.springframework.boot.SpringApplication application)
      Specified by:
      postProcessEnvironment in interface org.springframework.boot.env.EnvironmentPostProcessor
    • onApplicationEvent

      public void onApplicationEvent(ApplicationEvent event)
      Specified by:
      onApplicationEvent in interface ApplicationListener<ApplicationEvent>
    • increaseInvocationCount

      protected void increaseInvocationCount()
      EnvironmentPostProcessors can end up getting called twice due to spring-cloud-commons functionality