Class ConfigDataEnvironmentPostProcessor

java.lang.Object
org.springframework.boot.context.config.ConfigDataEnvironmentPostProcessor
All Implemented Interfaces:
EnvironmentPostProcessor, org.springframework.core.Ordered

public class ConfigDataEnvironmentPostProcessor extends Object implements EnvironmentPostProcessor, org.springframework.core.Ordered
EnvironmentPostProcessor that loads and applies ConfigData to Spring's Environment.
Since:
2.4.0
  • Field Details

  • Constructor Details

  • Method Details

    • getOrder

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

      public void postProcessEnvironment(org.springframework.core.env.ConfigurableEnvironment environment, SpringApplication application)
      Description copied from interface: EnvironmentPostProcessor
      Post-process the given environment.
      Specified by:
      postProcessEnvironment in interface EnvironmentPostProcessor
      Parameters:
      environment - the environment to post-process
      application - the application to which the environment belongs
    • applyTo

      public static void applyTo(org.springframework.core.env.ConfigurableEnvironment environment)
      Apply ConfigData post-processing to an existing Environment. This method can be useful when working with an Environment that has been created directly and not necessarily as part of a SpringApplication.
      Parameters:
      environment - the environment to apply ConfigData to
    • applyTo

      public static void applyTo(org.springframework.core.env.ConfigurableEnvironment environment, org.springframework.core.io.ResourceLoader resourceLoader, ConfigurableBootstrapContext bootstrapContext, String... additionalProfiles)
      Apply ConfigData post-processing to an existing Environment. This method can be useful when working with an Environment that has been created directly and not necessarily as part of a SpringApplication.
      Parameters:
      environment - the environment to apply ConfigData to
      resourceLoader - the resource loader to use
      bootstrapContext - the bootstrap context to use or null to use a throw-away context
      additionalProfiles - any additional profiles that should be applied
    • applyTo

      public static void applyTo(org.springframework.core.env.ConfigurableEnvironment environment, org.springframework.core.io.ResourceLoader resourceLoader, ConfigurableBootstrapContext bootstrapContext, Collection<String> additionalProfiles)
      Apply ConfigData post-processing to an existing Environment. This method can be useful when working with an Environment that has been created directly and not necessarily as part of a SpringApplication.
      Parameters:
      environment - the environment to apply ConfigData to
      resourceLoader - the resource loader to use
      bootstrapContext - the bootstrap context to use or null to use a throw-away context
      additionalProfiles - any additional profiles that should be applied
    • applyTo

      public static void applyTo(org.springframework.core.env.ConfigurableEnvironment environment, org.springframework.core.io.ResourceLoader resourceLoader, ConfigurableBootstrapContext bootstrapContext, Collection<String> additionalProfiles, ConfigDataEnvironmentUpdateListener environmentUpdateListener)
      Apply ConfigData post-processing to an existing Environment. This method can be useful when working with an Environment that has been created directly and not necessarily as part of a SpringApplication.
      Parameters:
      environment - the environment to apply ConfigData to
      resourceLoader - the resource loader to use
      bootstrapContext - the bootstrap context to use or null to use a throw-away context
      additionalProfiles - any additional profiles that should be applied
      environmentUpdateListener - optional ConfigDataEnvironmentUpdateListener that can be used to track Environment updates.