类 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 StringProperty used to determine what action to take when aConfigDataLocationNotFoundExceptionis thrown.static final intThe default order for the processor.从接口继承的字段 org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
构造器概要
构造器构造器说明ConfigDataEnvironmentPostProcessor(DeferredLogFactory logFactory, ConfigurableBootstrapContext bootstrapContext) -
方法概要
修饰符和类型方法说明static 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.
-
字段详细资料
-
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 aConfigDataLocationNotFoundExceptionis thrown.- 另请参阅:
-
-
构造器详细资料
-
ConfigDataEnvironmentPostProcessor
public ConfigDataEnvironmentPostProcessor(DeferredLogFactory logFactory, ConfigurableBootstrapContext bootstrapContext)
-
-
方法详细资料
-
getOrder
public int getOrder() -
postProcessEnvironment
public void postProcessEnvironment(ConfigurableEnvironment environment, SpringApplication application) 从接口复制的说明:EnvironmentPostProcessorPost-process the givenenvironment.- 指定者:
postProcessEnvironment在接口中EnvironmentPostProcessor- 参数:
environment- the environment to post-processapplication- the application to which the environment belongs
-
applyTo
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.- 参数:
environment- the environment to applyConfigDatato
-
applyTo
public 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.- 参数:
environment- the environment to applyConfigDatatoresourceLoader- the resource loader to usebootstrapContext- the bootstrap context to use ornullto 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) 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.- 参数:
environment- the environment to applyConfigDatatoresourceLoader- the resource loader to usebootstrapContext- the bootstrap context to use ornullto 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) 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.- 参数:
environment- the environment to applyConfigDatatoresourceLoader- the resource loader to usebootstrapContext- the bootstrap context to use ornullto use a throw-away contextadditionalProfiles- any additional profiles that should be appliedenvironmentUpdateListener- optionalConfigDataEnvironmentUpdateListenerthat can be used to trackEnvironmentupdates.
-