public class ReloadingPropertyPlaceholderConfigurer extends DefaultPropertyPlaceholderConfigurer implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean, IReloadablePropertiesListener, org.springframework.context.ApplicationContextAware
| Modifier and Type | Class and Description |
|---|---|
protected class |
ReloadingPropertyPlaceholderConfigurer.PlaceholderResolvingStringValueResolver |
| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
logger |
DEFAULT_DEFAULT_SEPARATORSYSTEM_PROPERTIES_MODE_FALLBACK, SYSTEM_PROPERTIES_MODE_NEVER, SYSTEM_PROPERTIES_MODE_OVERRIDEDEFAULT_PLACEHOLDER_PREFIX, DEFAULT_PLACEHOLDER_SUFFIX, DEFAULT_VALUE_SEPARATOR, ignoreUnresolvablePlaceholders, nullValue, valueSeparator| Constructor and Description |
|---|
ReloadingPropertyPlaceholderConfigurer() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet()
afterPropertiesSet
将自己 添加 property listener
|
void |
destroy()
destroy
删除 property listener
|
protected Properties |
mergeProperties()
merge property and record last merge
|
protected String |
parseStringValue(String strVal,
Properties props,
Set visitedPlaceholders)
对于被标记为动态的,进行 构造 property dependency
非动态的,则由原来的spring进行处理
|
protected void |
processProperties(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactoryToProcess,
Properties props)
copy & paste, just so we can insert our own visitor.
|
void |
propertiesReloaded(PropertiesReloadedEvent event)
当配置更新时,被调用
|
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
void |
setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) |
void |
setBeanName(String beanName) |
void |
setPlaceholderPrefix(String placeholderPrefix) |
void |
setPlaceholderSuffix(String placeholderSuffix) |
void |
setProperties(Properties properties) |
void |
setPropertiesArray(Properties[] propertiesArray) |
getDefault, getPlaceholder, resolvePlaceholder, setDefaultSeparatorresolvePlaceholder, resolveSystemProperty, setSearchSystemEnvironment, setSystemPropertiesMode, setSystemPropertiesModeNamedoProcessProperties, setIgnoreUnresolvablePlaceholders, setNullValue, setValueSeparatorconvertProperties, convertProperty, convertPropertyValue, getOrder, postProcessBeanFactory, setOrderpublic ReloadingPropertyPlaceholderConfigurer()
protected String parseStringValue(String strVal, Properties props, Set visitedPlaceholders) throws org.springframework.beans.factory.BeanDefinitionStoreException
parseStringValue in class org.springframework.beans.factory.config.PropertyPlaceholderConfigurerstrVal - props - visitedPlaceholders - org.springframework.beans.factory.BeanDefinitionStoreExceptionprotected Properties mergeProperties() throws IOException
mergeProperties in class org.springframework.core.io.support.PropertiesLoaderSupportIOExceptionpublic void propertiesReloaded(PropertiesReloadedEvent event)
propertiesReloaded in interface IReloadablePropertiesListenerevent - protected void processProperties(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactoryToProcess,
Properties props)
throws org.springframework.beans.BeansException
processProperties in class org.springframework.beans.factory.config.PropertyPlaceholderConfigurerorg.springframework.beans.BeansExceptionpublic void afterPropertiesSet()
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanpublic void destroy()
throws Exception
destroy in interface org.springframework.beans.factory.DisposableBeanExceptionpublic void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionpublic void setProperties(Properties properties)
setProperties in class org.springframework.core.io.support.PropertiesLoaderSupportpublic void setPropertiesArray(Properties[] propertiesArray)
setPropertiesArray in class org.springframework.core.io.support.PropertiesLoaderSupportpublic void setPlaceholderPrefix(String placeholderPrefix)
setPlaceholderPrefix in class org.springframework.beans.factory.config.PlaceholderConfigurerSupportpublic void setPlaceholderSuffix(String placeholderSuffix)
setPlaceholderSuffix in class org.springframework.beans.factory.config.PlaceholderConfigurerSupportpublic void setBeanName(String beanName)
setBeanName in interface org.springframework.beans.factory.BeanNameAwaresetBeanName in class org.springframework.beans.factory.config.PlaceholderConfigurerSupportpublic void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAwaresetBeanFactory in class org.springframework.beans.factory.config.PlaceholderConfigurerSupportCopyright © 2015–2016 Baidu. All rights reserved.