public class ConfigCenterPropertyPlaceholderConfigurer
extends org.springframework.context.support.PropertySourcesPlaceholderConfigurer
implements org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.DisposableBean, org.springframework.context.ApplicationListener
| 限定符和类型 | 字段和说明 |
|---|---|
protected Properties |
cachedProps |
protected Properties |
ccLoadedProps
local cached props load from configuration center
|
static String |
RCC_PROPERTIES_PROPERTY_SOURCE_NAME
rccProperties
|
protected Properties |
rccProperties |
ENVIRONMENT_PROPERTIES_PROPERTY_SOURCE_NAME, LOCAL_PROPERTIES_PROPERTY_SOURCE_NAMEDEFAULT_PLACEHOLDER_PREFIX, DEFAULT_PLACEHOLDER_SUFFIX, DEFAULT_VALUE_SEPARATOR, ignoreUnresolvablePlaceholders, nullValue, placeholderPrefix, placeholderSuffix, trimValues, valueSeparator| 构造器和说明 |
|---|
ConfigCenterPropertyPlaceholderConfigurer() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
destroy()
Stop
ConfigLoader listener and destroy proxy bean on spring container closing. |
protected void |
doLogLoadedProperties(Properties props)
log out loaded properties.
|
protected void |
doProcessProperties(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactoryToProcess,
org.springframework.util.StringValueResolver valueResolver) |
static <T> T |
getFieldValue(Object target,
String fieldName,
Class<T> returnType) |
Map<String,String> |
getProperties()
Get all loaded properties.
|
protected void |
loadProperties(Properties props) |
void |
onApplicationEvent(org.springframework.context.ApplicationEvent event)
listen all spring application event
|
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
set
ApplicationContext instance after it created in spring container. |
void |
setCallbackInteval(long callbackInteval)
set call back listen call back interval
|
void |
setCcEnvId(long ccEnvId)
set environment id
|
void |
setCcPassword(String ccPassword)
set password
|
void |
setCcServerUrl(String ccServerUrl)
set server url
|
void |
setCcVersion(long ccVersion)
set version
|
void |
setCcVersionName(String ccVersionName)
set version name
|
void |
setConnectionTimeout(int connectionTimeout)
set connection time out value
|
void |
setEnableInterruptService(boolean enableInterruptService) |
void |
setEnableUpdateCallback(boolean enableUpdateCallback)
set enableUpdateCallback value
|
void |
setEnvironment(org.springframework.core.env.Environment environment) |
void |
setEnvName(String envName)
set environment name
|
void |
setLogProperties(boolean logProperties)
set logProperties
|
void |
setProjectName(String projectName)
set project name
|
void |
setReadTimeout(int readTimeout)
set read time out value
|
getAppliedPropertySources, postProcessBeanFactory, processProperties, processProperties, setPropertySourcessetBeanFactory, setBeanName, setIgnoreUnresolvablePlaceholders, setNullValue, setPlaceholderPrefix, setPlaceholderSuffix, setTrimValues, setValueSeparatorconvertProperties, convertProperty, convertPropertyValue, getOrder, setOrderpublic static final String RCC_PROPERTIES_PROPERTY_SOURCE_NAME
protected Properties ccLoadedProps
protected Properties cachedProps
protected Properties rccProperties
public ConfigCenterPropertyPlaceholderConfigurer()
public void setProjectName(String projectName)
projectName - the projectName to setpublic void setEnvName(String envName)
envName - the envName to setpublic void setEnvironment(org.springframework.core.env.Environment environment)
setEnvironment 在接口中 org.springframework.context.EnvironmentAwaresetEnvironment 在类中 org.springframework.context.support.PropertySourcesPlaceholderConfigurerpublic void setLogProperties(boolean logProperties)
logProperties - the logProperties to setpublic void setCallbackInteval(long callbackInteval)
callbackInteval - the callbackInteval to setpublic void setEnableInterruptService(boolean enableInterruptService)
public void setCcServerUrl(String ccServerUrl)
ccServerUrl - the ccServerUrl to setpublic void setCcPassword(String ccPassword)
ccPassword - the ccPassword to setpublic void setCcVersion(long ccVersion)
ccVersion - the ccVersion to setpublic void setCcVersionName(String ccVersionName)
ccVersionName - the ccVersionName to setpublic void setCcEnvId(long ccEnvId)
ccEnvId - the ccEnvId to setpublic void setReadTimeout(int readTimeout)
readTimeout - the readTimeout to setpublic void setConnectionTimeout(int connectionTimeout)
connectionTimeout - the connectionTimeout to setpublic void setEnableUpdateCallback(boolean enableUpdateCallback)
enableUpdateCallback - valueprotected void doProcessProperties(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactoryToProcess,
org.springframework.util.StringValueResolver valueResolver)
doProcessProperties 在类中 org.springframework.beans.factory.config.PlaceholderConfigurerSupportprotected void doLogLoadedProperties(Properties props)
props - properties to log outprotected void loadProperties(Properties props) throws IOException
loadProperties 在类中 org.springframework.core.io.support.PropertiesLoaderSupportIOExceptionpublic void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
ApplicationContext instance after it created in spring container.ApplicationContextAware interface.setApplicationContext 在接口中 org.springframework.context.ApplicationContextAwareapplicationContext - spring application context instanceorg.springframework.beans.BeansException - bean create exceptionpublic void destroy()
throws Exception
ConfigLoader listener and destroy proxy bean on spring container closing.destroy 在接口中 org.springframework.beans.factory.DisposableBeanException - throws any exception.public void onApplicationEvent(org.springframework.context.ApplicationEvent event)
onApplicationEvent 在接口中 org.springframework.context.ApplicationListenerevent - spring application eventpublic Map<String,String> getProperties()
public static <T> T getFieldValue(Object target, String fieldName, Class<T> returnType) throws IllegalAccessException
Copyright © 2021. All rights reserved.