Package org.apache.dubbo.config.spring
Class ConfigCenterBean
java.lang.Object
org.apache.dubbo.config.AbstractConfig
org.apache.dubbo.config.ConfigCenterConfig
org.apache.dubbo.config.spring.ConfigCenterBean
- All Implemented Interfaces:
Serializable,org.springframework.beans.factory.Aware,org.springframework.beans.factory.DisposableBean,org.springframework.context.ApplicationContextAware,org.springframework.context.EnvironmentAware
public class ConfigCenterBean
extends ConfigCenterConfig
implements org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.DisposableBean, org.springframework.context.EnvironmentAware
Starting from 2.7.0+, export and refer will only be executed when Spring is fully initialized.
Each Config bean will get refreshed on the start of the exporting and referring process.
So it's ok for this bean not to be the first Dubbo Config bean being initialized.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConfigCenterBean(org.apache.dubbo.rpc.model.ApplicationModel applicationModel) -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()org.springframework.context.ApplicationContextvoidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) voidsetEnvironment(org.springframework.core.env.Environment environment) voidsetIncludeSpringEnv(Boolean includeSpringEnv) Methods inherited from class org.apache.dubbo.config.ConfigCenterConfig
checkOrUpdateInitialized, getAddress, getAppConfigFile, getAppExternalConfiguration, getCluster, getConfigFile, getExternalConfiguration, getGroup, getNamespace, getParameters, getPassword, getPort, getProtocol, getTimeout, getUsername, isCheck, isHighestPriority, isValid, setAddress, setAppConfigFile, setAppExternalConfig, setCheck, setCluster, setConfigFile, setExternalConfig, setGroup, setHighestPriority, setInitialized, setNamespace, setParameters, setPassword, setPort, setProtocol, setTimeout, setUsername, toUrl, updateParametersMethods inherited from class org.apache.dubbo.config.AbstractConfig
appendAttributes, appendAttributes, appendParameters, appendParameters, equals, getApplicationModel, getConfigMode, getId, getMetaData, getMetaData, getPluralTagName, getPrefixes, getScopeModel, getTagName, getTypePrefix, hashCode, isDefault, isNeedRefresh, isRefreshed, overrideWithConfig, refresh, setDefault, setId, setNeedRefresh, setScopeModel, toString
-
Constructor Details
-
ConfigCenterBean
public ConfigCenterBean() -
ConfigCenterBean
public ConfigCenterBean(org.apache.dubbo.rpc.model.ApplicationModel applicationModel)
-
-
Method Details
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware
-
destroy
- Specified by:
destroyin interfaceorg.springframework.beans.factory.DisposableBean- Throws:
Exception
-
setEnvironment
public void setEnvironment(org.springframework.core.env.Environment environment) - Specified by:
setEnvironmentin interfaceorg.springframework.context.EnvironmentAware
-
getApplicationContext
public org.springframework.context.ApplicationContext getApplicationContext() -
getIncludeSpringEnv
-
setIncludeSpringEnv
-