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
- Since:
- 2.4.0
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Property used to determine what action to take when aConfigDataLocationNotFoundException
is thrown.static final int
The default order for the processor.Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
ConstructorDescriptionConfigDataEnvironmentPostProcessor
(DeferredLogFactory logFactory, ConfigurableBootstrapContext bootstrapContext) -
Method Summary
Modifier and TypeMethodDescriptionstatic void
applyTo
(org.springframework.core.env.ConfigurableEnvironment environment) ApplyConfigData
post-processing to an existingEnvironment
.static void
applyTo
(org.springframework.core.env.ConfigurableEnvironment environment, org.springframework.core.io.ResourceLoader resourceLoader, ConfigurableBootstrapContext bootstrapContext, String... additionalProfiles) ApplyConfigData
post-processing to an existingEnvironment
.static void
applyTo
(org.springframework.core.env.ConfigurableEnvironment environment, org.springframework.core.io.ResourceLoader resourceLoader, ConfigurableBootstrapContext bootstrapContext, Collection<String> additionalProfiles) ApplyConfigData
post-processing to an existingEnvironment
.static void
applyTo
(org.springframework.core.env.ConfigurableEnvironment environment, org.springframework.core.io.ResourceLoader resourceLoader, ConfigurableBootstrapContext bootstrapContext, Collection<String> additionalProfiles, ConfigDataEnvironmentUpdateListener environmentUpdateListener) ApplyConfigData
post-processing to an existingEnvironment
.int
getOrder()
void
postProcessEnvironment
(org.springframework.core.env.ConfigurableEnvironment environment, SpringApplication application) Post-process the givenenvironment
.
-
Field Details
-
ORDER
public static final int ORDERThe default order for the processor.- See Also:
-
ON_LOCATION_NOT_FOUND_PROPERTY
Property used to determine what action to take when aConfigDataLocationNotFoundException
is thrown.
-
-
Constructor Details
-
ConfigDataEnvironmentPostProcessor
public ConfigDataEnvironmentPostProcessor(DeferredLogFactory logFactory, ConfigurableBootstrapContext bootstrapContext)
-
-
Method Details
-
getOrder
public int getOrder()- Specified by:
getOrder
in interfaceorg.springframework.core.Ordered
-
postProcessEnvironment
public void postProcessEnvironment(org.springframework.core.env.ConfigurableEnvironment environment, SpringApplication application) Description copied from interface:EnvironmentPostProcessor
Post-process the givenenvironment
.- Specified by:
postProcessEnvironment
in interfaceEnvironmentPostProcessor
- Parameters:
environment
- the environment to post-processapplication
- the application to which the environment belongs
-
applyTo
public static void applyTo(org.springframework.core.env.ConfigurableEnvironment environment) ApplyConfigData
post-processing to an existingEnvironment
. This method can be useful when working with anEnvironment
that has been created directly and not necessarily as part of aSpringApplication
.- Parameters:
environment
- the environment to applyConfigData
to
-
applyTo
public static void applyTo(org.springframework.core.env.ConfigurableEnvironment environment, org.springframework.core.io.ResourceLoader resourceLoader, ConfigurableBootstrapContext bootstrapContext, String... additionalProfiles) ApplyConfigData
post-processing to an existingEnvironment
. This method can be useful when working with anEnvironment
that has been created directly and not necessarily as part of aSpringApplication
.- Parameters:
environment
- the environment to applyConfigData
toresourceLoader
- the resource loader to usebootstrapContext
- the bootstrap context to use ornull
to use a throw-away contextadditionalProfiles
- 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) ApplyConfigData
post-processing to an existingEnvironment
. This method can be useful when working with anEnvironment
that has been created directly and not necessarily as part of aSpringApplication
.- Parameters:
environment
- the environment to applyConfigData
toresourceLoader
- the resource loader to usebootstrapContext
- the bootstrap context to use ornull
to use a throw-away contextadditionalProfiles
- 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) ApplyConfigData
post-processing to an existingEnvironment
. This method can be useful when working with anEnvironment
that has been created directly and not necessarily as part of aSpringApplication
.- Parameters:
environment
- the environment to applyConfigData
toresourceLoader
- the resource loader to usebootstrapContext
- the bootstrap context to use ornull
to use a throw-away contextadditionalProfiles
- any additional profiles that should be appliedenvironmentUpdateListener
- optionalConfigDataEnvironmentUpdateListener
that can be used to trackEnvironment
updates.
-