public class ReloadablePropertiesFactoryBean
extends org.springframework.beans.factory.config.PropertiesFactoryBean
implements org.springframework.beans.factory.DisposableBean, org.springframework.context.ApplicationContextAware
| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
log |
| Constructor and Description |
|---|
ReloadablePropertiesFactoryBean() |
| Modifier and Type | Method and Description |
|---|---|
protected Object |
createMyInstance()
createInstance 废弃了
|
protected Properties |
createProperties() |
void |
destroy() |
protected org.springframework.core.io.Resource[] |
getLocations() |
protected void |
reload(boolean forceReload)
根据修改时间来判定是否reload
|
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
void |
setListeners(List listeners)
listener , 用于通知回调
|
void |
setLocation(String fileNames)
定义资源文件
|
void |
setLocations(List<String> fileNames) |
String |
toString() |
afterPropertiesSet, getObject, getObjectType, isSingleton, setSingletonpublic void setLocation(String fileNames)
fileNames - protected org.springframework.core.io.Resource[] getLocations()
public void setListeners(List listeners)
listeners - protected Properties createProperties() throws IOException
createProperties in class org.springframework.beans.factory.config.PropertiesFactoryBeanIOExceptionprotected Object createMyInstance() throws IOException
IOExceptionpublic void destroy()
throws Exception
destroy in interface org.springframework.beans.factory.DisposableBeanExceptionprotected void reload(boolean forceReload)
throws IOException
forceReload - IOExceptionpublic void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionCopyright © 2015–2016 Baidu. All rights reserved.