org.springframework.boot.env

Interface EnvironmentPostProcessor

  • All Known Implementing Classes:
    CloudFoundryVcapEnvironmentPostProcessor, ConfigFileApplicationListener, SpringApplicationJsonEnvironmentPostProcessor, SystemEnvironmentPropertySourceEnvironmentPostProcessor
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.


    @FunctionalInterface
    public interface EnvironmentPostProcessor
    Allows for customization of the application's Environment prior to the application context being refreshed.

    EnvironmentPostProcessor implementations have to be registered in META-INF/spring.factories, using the fully qualified name of this class as the key.

    EnvironmentPostProcessor processors are encouraged to detect whether Spring's Ordered interface has been implemented or if the @Order annotation is present and to sort instances accordingly if so prior to invocation.

    Since:
    1.3.0
    Author:
    Andy Wilkinson, Stephane Nicoll
    • Method Detail

      • postProcessEnvironment

        void postProcessEnvironment(org.springframework.core.env.ConfigurableEnvironment environment,
                                    SpringApplication application)
        Post-process the given environment.
        Parameters:
        environment - the environment to post-process
        application - the application to which the environment belongs

Copyright © 2019 Pivotal Software, Inc.. All rights reserved.