Class ConfigDataEnvironmentPostProcessor
java.lang.Object
org.springframework.boot.context.config.ConfigDataEnvironmentPostProcessor
- All Implemented Interfaces:
- EnvironmentPostProcessor,- Ordered
public class ConfigDataEnvironmentPostProcessor
extends Object
implements EnvironmentPostProcessor, Ordered
- Since:
- 2.4.0
- Author:
- Phillip Webb, Madhura Bhave, Nguyen Bao Sach
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringProperty used to determine what action to take when aConfigDataLocationNotFoundExceptionis thrown.static final intThe default order for the processor.Fields inherited from interface org.springframework.core.OrderedHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
- 
Constructor SummaryConstructorsConstructorDescriptionConfigDataEnvironmentPostProcessor(DeferredLogFactory logFactory, ConfigurableBootstrapContext bootstrapContext) 
- 
Method SummaryModifier and TypeMethodDescriptionstatic voidapplyTo(ConfigurableEnvironment environment) ApplyConfigDatapost-processing to an existingEnvironment.static voidapplyTo(ConfigurableEnvironment environment, ResourceLoader resourceLoader, ConfigurableBootstrapContext bootstrapContext, String... additionalProfiles) ApplyConfigDatapost-processing to an existingEnvironment.static voidapplyTo(ConfigurableEnvironment environment, ResourceLoader resourceLoader, ConfigurableBootstrapContext bootstrapContext, Collection<String> additionalProfiles) ApplyConfigDatapost-processing to an existingEnvironment.static voidapplyTo(ConfigurableEnvironment environment, ResourceLoader resourceLoader, ConfigurableBootstrapContext bootstrapContext, Collection<String> additionalProfiles, ConfigDataEnvironmentUpdateListener environmentUpdateListener) ApplyConfigDatapost-processing to an existingEnvironment.intgetOrder()voidpostProcessEnvironment(ConfigurableEnvironment environment, SpringApplication application) Post-process the givenenvironment.
- 
Field Details- 
ORDERpublic static final int ORDERThe default order for the processor.- See Also:
 
- 
ON_LOCATION_NOT_FOUND_PROPERTYProperty used to determine what action to take when aConfigDataLocationNotFoundExceptionis thrown.
 
- 
- 
Constructor Details- 
ConfigDataEnvironmentPostProcessorpublic ConfigDataEnvironmentPostProcessor(DeferredLogFactory logFactory, ConfigurableBootstrapContext bootstrapContext) 
 
- 
- 
Method Details- 
getOrderpublic int getOrder()
- 
postProcessEnvironmentpublic void postProcessEnvironment(ConfigurableEnvironment environment, SpringApplication application) Description copied from interface:EnvironmentPostProcessorPost-process the givenenvironment.- Specified by:
- postProcessEnvironmentin interface- EnvironmentPostProcessor
- Parameters:
- environment- the environment to post-process
- application- the application to which the environment belongs
 
- 
applyToApplyConfigDatapost-processing to an existingEnvironment. This method can be useful when working with anEnvironmentthat has been created directly and not necessarily as part of aSpringApplication.- Parameters:
- environment- the environment to apply- ConfigDatato
 
- 
applyTopublic static void applyTo(ConfigurableEnvironment environment, ResourceLoader resourceLoader, ConfigurableBootstrapContext bootstrapContext, String... additionalProfiles) ApplyConfigDatapost-processing to an existingEnvironment. This method can be useful when working with anEnvironmentthat has been created directly and not necessarily as part of aSpringApplication.- Parameters:
- environment- the environment to apply- ConfigDatato
- resourceLoader- the resource loader to use
- bootstrapContext- the bootstrap context to use or- nullto use a throw-away context
- additionalProfiles- any additional profiles that should be applied
 
- 
applyTopublic static void applyTo(ConfigurableEnvironment environment, ResourceLoader resourceLoader, ConfigurableBootstrapContext bootstrapContext, Collection<String> additionalProfiles) ApplyConfigDatapost-processing to an existingEnvironment. This method can be useful when working with anEnvironmentthat has been created directly and not necessarily as part of aSpringApplication.- Parameters:
- environment- the environment to apply- ConfigDatato
- resourceLoader- the resource loader to use
- bootstrapContext- the bootstrap context to use or- nullto use a throw-away context
- additionalProfiles- any additional profiles that should be applied
 
- 
applyTopublic static void applyTo(ConfigurableEnvironment environment, ResourceLoader resourceLoader, ConfigurableBootstrapContext bootstrapContext, Collection<String> additionalProfiles, ConfigDataEnvironmentUpdateListener environmentUpdateListener) ApplyConfigDatapost-processing to an existingEnvironment. This method can be useful when working with anEnvironmentthat has been created directly and not necessarily as part of aSpringApplication.- Parameters:
- environment- the environment to apply- ConfigDatato
- resourceLoader- the resource loader to use
- bootstrapContext- the bootstrap context to use or- nullto use a throw-away context
- additionalProfiles- any additional profiles that should be applied
- environmentUpdateListener- optional- ConfigDataEnvironmentUpdateListenerthat can be used to track- Environmentupdates.
 
 
-