public class ConfigProperties extends Object implements org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor, EzRootApplicationListener, org.springframework.context.EnvironmentAware, org.springframework.context.EmbeddedValueResolverAware
扫描本框架默认配置文件并注入context中
优先级高于xml文件&{}扫描与@Value扫描并提供转换支持
若开发者不使用< context:property-placeholder/>标签
则将自动注册PropertySourcesPlaceholderConfigurer
并启动扫描
可在properties/config.properties 配置文件中配置 sys.properties 配置项来增加需要扫描的配置文件
最佳支持版本:spring-4.3.13.RELEASE,spring-boot-1.5.9.RELEASE
PropertySourcesPlaceholderConfigurer| 限定符和类型 | 字段和说明 |
|---|---|
static String |
DEFAULT_CONFIG_FILE |
static String |
DEFAULT_CONFIG_NAME |
static String |
DEFAULT_PROPERTIES |
static String |
DEFAULT_PROPERTIES_SCAN |
static org.springframework.web.context.support.StandardServletEnvironment |
localenv |
static org.springframework.util.StringValueResolver |
resolver |
static String |
SYS_PROPERTIES_SCAN |
static String |
SYS2_PROPERTIES_SCAN |
| 构造器和说明 |
|---|
ConfigProperties() |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
doWebAndRootApplicationListener(org.springframework.context.event.ContextRefreshedEvent event)
若为spring-boot项目,是否执行普通web工程监听器
|
void |
onRootApplicationEvent(org.springframework.context.event.ContextRefreshedEvent event)
ROOT APPLICATION 初始化完成回调函数
|
void |
postProcessBeanDefinitionRegistry(org.springframework.beans.factory.support.BeanDefinitionRegistry registry) |
void |
postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory) |
void |
setEmbeddedValueResolver(org.springframework.util.StringValueResolver resolver) |
void |
setEnvironment(org.springframework.core.env.Environment environment) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitonBootApplicationEvent, onWebApplicationEventpublic static org.springframework.web.context.support.StandardServletEnvironment localenv
public static org.springframework.util.StringValueResolver resolver
public void postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)
throws org.springframework.beans.BeansException
postProcessBeanFactory 在接口中 org.springframework.beans.factory.config.BeanFactoryPostProcessororg.springframework.beans.BeansExceptionpublic void onRootApplicationEvent(org.springframework.context.event.ContextRefreshedEvent event)
EzApplicationListeneronRootApplicationEvent 在接口中 EzApplicationListeneronRootApplicationEvent 在接口中 EzRootApplicationListenerpublic boolean doWebAndRootApplicationListener(org.springframework.context.event.ContextRefreshedEvent event)
EzApplicationListenerdoWebAndRootApplicationListener 在接口中 EzApplicationListenerpublic void postProcessBeanDefinitionRegistry(org.springframework.beans.factory.support.BeanDefinitionRegistry registry)
throws org.springframework.beans.BeansException
postProcessBeanDefinitionRegistry 在接口中 org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessororg.springframework.beans.BeansExceptionpublic void setEnvironment(org.springframework.core.env.Environment environment)
setEnvironment 在接口中 org.springframework.context.EnvironmentAwarepublic void setEmbeddedValueResolver(org.springframework.util.StringValueResolver resolver)
setEmbeddedValueResolver 在接口中 org.springframework.context.EmbeddedValueResolverAwareCopyright © 2018. All rights reserved.