T - The type of BeanDefinitionpublic abstract class AbstractNacosPropertySourceBuilder<T extends org.springframework.beans.factory.config.BeanDefinition> extends Object implements org.springframework.context.EnvironmentAware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.InitializingBean
NacosPropertySource Builder| Modifier and Type | Field and Description |
|---|---|
protected org.springframework.beans.factory.BeanFactory |
beanFactory |
protected org.springframework.core.env.ConfigurableEnvironment |
environment |
protected org.slf4j.Logger |
logger |
| Constructor and Description |
|---|
AbstractNacosPropertySourceBuilder() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
List<NacosPropertySource> |
build(String beanName,
T beanDefinition)
Build
NacosPropertySource from BeanDefinition |
protected abstract NacosConfigMetadataEvent |
createMetaEvent(NacosPropertySource nacosPropertySource,
T beanDefinition) |
protected NacosPropertySource |
doBuild(String beanName,
T beanDefinition,
Map<String,Object> runtimeAttributes) |
protected abstract void |
doInitMetadataEvent(NacosPropertySource nacosPropertySource,
T beanDefinition,
NacosConfigMetadataEvent metadataEvent) |
Class<T> |
getBeanDefinitionType()
The type of
Bean Definition |
protected abstract void |
initNacosPropertySource(NacosPropertySource nacosPropertySource,
T beanDefinition,
Map<String,Object> attributes) |
protected abstract Map<String,Object>[] |
resolveRuntimeAttributesArray(T beanDefinition,
Properties globalNacosProperties)
|
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
void |
setBeanClassLoader(ClassLoader classLoader) |
void |
setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) |
void |
setEnvironment(org.springframework.core.env.Environment environment) |
boolean |
supports(org.springframework.beans.factory.config.BeanDefinition beanDefinition)
Whether target
BeanDefinition supports or not |
protected final org.slf4j.Logger logger
protected org.springframework.core.env.ConfigurableEnvironment environment
protected org.springframework.beans.factory.BeanFactory beanFactory
public List<NacosPropertySource> build(String beanName, T beanDefinition)
NacosPropertySource from BeanDefinitionbeanName - Bean namebeanDefinition - BeanDefinitionNacosPropertySource instanceprotected abstract NacosConfigMetadataEvent createMetaEvent(NacosPropertySource nacosPropertySource, T beanDefinition)
protected abstract void doInitMetadataEvent(NacosPropertySource nacosPropertySource, T beanDefinition, NacosConfigMetadataEvent metadataEvent)
protected NacosPropertySource doBuild(String beanName, T beanDefinition, Map<String,Object> runtimeAttributes)
protected abstract Map<String,Object>[] resolveRuntimeAttributesArray(T beanDefinition, Properties globalNacosProperties)
beanDefinition - Bean DefinitionglobalNacosProperties - Global Nacos Propertiesprotected abstract void initNacosPropertySource(NacosPropertySource nacosPropertySource, T beanDefinition, Map<String,Object> attributes)
public boolean supports(org.springframework.beans.factory.config.BeanDefinition beanDefinition)
BeanDefinition supports or notbeanDefinition - BeanDefinitiontrue, or falsepublic void setEnvironment(org.springframework.core.env.Environment environment)
setEnvironment in interface org.springframework.context.EnvironmentAwarepublic void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
throws org.springframework.beans.BeansException
setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAwareorg.springframework.beans.BeansExceptionpublic void setBeanClassLoader(ClassLoader classLoader)
setBeanClassLoader in interface org.springframework.beans.factory.BeanClassLoaderAwarepublic void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
setApplicationContext in interface org.springframework.context.ApplicationContextAwarepublic void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanExceptionCopyright © 2020. All rights reserved.