public class NacosPropertySourcePostProcessor extends Object implements org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor, org.springframework.beans.factory.config.BeanFactoryPostProcessor, org.springframework.context.EnvironmentAware, org.springframework.core.Ordered
Post Processor resolves
@NacosPropertySource or
@NacosPropertySources or NacosPropertySourceXmlBeanDefinition to be
PropertySource, and append into Spring PropertySources NacosPropertySource,
NacosPropertySources,
NacosPropertySourceXmlBeanDefinition,
PropertySource,
BeanDefinitionRegistryPostProcessor| 限定符和类型 | 字段和说明 |
|---|---|
static String |
BEAN_NAME
The bean name of
NacosPropertySourcePostProcessor |
private static org.springframework.beans.factory.BeanFactory |
beanFactory |
private ConfigServiceBeanBuilder |
configServiceBeanBuilder |
private org.springframework.core.env.ConfigurableEnvironment |
environment |
private Collection<AbstractNacosPropertySourceBuilder> |
nacosPropertySourceBuilders |
private Set<String> |
processedBeanNames |
| 构造器和说明 |
|---|
NacosPropertySourcePostProcessor() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
addListenerIfAutoRefreshed(NacosPropertySource nacosPropertySource,
Properties properties,
org.springframework.core.env.ConfigurableEnvironment environment) |
private void |
addNacosPropertySource(NacosPropertySource nacosPropertySource) |
private List<NacosPropertySource> |
buildNacosPropertySources(String beanName,
org.springframework.beans.factory.config.BeanDefinition beanDefinition) |
int |
getOrder()
The order is closed to
HIGHEST_PRECEDENCE almost. |
void |
postProcessBeanDefinitionRegistry(org.springframework.beans.factory.support.BeanDefinitionRegistry registry) |
void |
postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory) |
private void |
processPropertySource(String beanName,
org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory) |
void |
setEnvironment(org.springframework.core.env.Environment environment) |
public static final String BEAN_NAME
NacosPropertySourcePostProcessorprivate static org.springframework.beans.factory.BeanFactory beanFactory
private org.springframework.core.env.ConfigurableEnvironment environment
private Collection<AbstractNacosPropertySourceBuilder> nacosPropertySourceBuilders
private ConfigServiceBeanBuilder configServiceBeanBuilder
public static void addListenerIfAutoRefreshed(NacosPropertySource nacosPropertySource, Properties properties, org.springframework.core.env.ConfigurableEnvironment environment)
public void postProcessBeanDefinitionRegistry(org.springframework.beans.factory.support.BeanDefinitionRegistry registry)
throws org.springframework.beans.BeansException
postProcessBeanDefinitionRegistry 在接口中 org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessororg.springframework.beans.BeansExceptionpublic void postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)
throws org.springframework.beans.BeansException
postProcessBeanFactory 在接口中 org.springframework.beans.factory.config.BeanFactoryPostProcessororg.springframework.beans.BeansExceptionprivate void processPropertySource(String beanName, org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)
private List<NacosPropertySource> buildNacosPropertySources(String beanName, org.springframework.beans.factory.config.BeanDefinition beanDefinition)
private void addNacosPropertySource(NacosPropertySource nacosPropertySource)
public int getOrder()
HIGHEST_PRECEDENCE almost.getOrder 在接口中 org.springframework.core.OrderedOrdered.HIGHEST_PRECEDENCE + 1ConfigurationClassPostProcessor.getOrder()public void setEnvironment(org.springframework.core.env.Environment environment)
setEnvironment 在接口中 org.springframework.context.EnvironmentAwareCopyright © 2021 Zodiac. All rights reserved.