类 ConfigDataEnvironmentPostProcessor
java.lang.Object
org.springframework.boot.context.config.ConfigDataEnvironmentPostProcessor
- 所有已实现的接口:
EnvironmentPostProcessor
,Ordered
public class ConfigDataEnvironmentPostProcessor
extends Object
implements EnvironmentPostProcessor, Ordered
- 从以下版本开始:
- 2.4.0
- 作者:
- Phillip Webb, Madhura Bhave, Nguyen Bao Sach
-
字段概要
字段修饰符和类型字段说明static final String
Property used to determine what action to take when aConfigDataLocationNotFoundException
is thrown.static final int
The default order for the processor.从接口继承的字段 org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
构造器概要
构造器构造器说明ConfigDataEnvironmentPostProcessor
(DeferredLogFactory logFactory, ConfigurableBootstrapContext bootstrapContext) -
方法概要
修饰符和类型方法说明static void
applyTo
(ConfigurableEnvironment environment) ApplyConfigData
post-processing to an existingEnvironment
.static void
applyTo
(ConfigurableEnvironment environment, ResourceLoader resourceLoader, ConfigurableBootstrapContext bootstrapContext, String... additionalProfiles) ApplyConfigData
post-processing to an existingEnvironment
.static void
applyTo
(ConfigurableEnvironment environment, ResourceLoader resourceLoader, ConfigurableBootstrapContext bootstrapContext, Collection<String> additionalProfiles) ApplyConfigData
post-processing to an existingEnvironment
.static void
applyTo
(ConfigurableEnvironment environment, ResourceLoader resourceLoader, ConfigurableBootstrapContext bootstrapContext, Collection<String> additionalProfiles, ConfigDataEnvironmentUpdateListener environmentUpdateListener) ApplyConfigData
post-processing to an existingEnvironment
.int
getOrder()
void
postProcessEnvironment
(ConfigurableEnvironment environment, SpringApplication application) Post-process the givenenvironment
.
-
字段详细资料
-
ORDER
public static final int ORDERThe default order for the processor.- 另请参阅:
-
ON_LOCATION_NOT_FOUND_PROPERTY
Property used to determine what action to take when aConfigDataLocationNotFoundException
is thrown.- 另请参阅:
-
-
构造器详细资料
-
ConfigDataEnvironmentPostProcessor
public ConfigDataEnvironmentPostProcessor(DeferredLogFactory logFactory, ConfigurableBootstrapContext bootstrapContext)
-
-
方法详细资料
-
getOrder
public int getOrder() -
postProcessEnvironment
public void postProcessEnvironment(ConfigurableEnvironment environment, SpringApplication application) 从接口复制的说明:EnvironmentPostProcessor
Post-process the givenenvironment
.- 指定者:
postProcessEnvironment
在接口中EnvironmentPostProcessor
- 参数:
environment
- the environment to post-processapplication
- the application to which the environment belongs
-
applyTo
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
.- 参数:
environment
- the environment to applyConfigData
to
-
applyTo
public static void applyTo(ConfigurableEnvironment environment, 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
.- 参数:
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(ConfigurableEnvironment environment, 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
.- 参数:
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(ConfigurableEnvironment environment, 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
.- 参数:
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.
-