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| Modifier and Type | Field and Description |
|---|---|
static String |
BEAN_NAME
The bean name of
NacosPropertySourcePostProcessor |
| Constructor and Description |
|---|
NacosPropertySourcePostProcessor() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addListenerIfAutoRefreshed(NacosPropertySource nacosPropertySource,
Properties properties,
org.springframework.core.env.ConfigurableEnvironment environment) |
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) |
void |
setEnvironment(org.springframework.core.env.Environment environment) |
public static final String BEAN_NAME
NacosPropertySourcePostProcessorpublic void postProcessBeanDefinitionRegistry(org.springframework.beans.factory.support.BeanDefinitionRegistry registry)
throws org.springframework.beans.BeansException
postProcessBeanDefinitionRegistry in interface org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessororg.springframework.beans.BeansExceptionpublic void postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)
throws org.springframework.beans.BeansException
postProcessBeanFactory in interface org.springframework.beans.factory.config.BeanFactoryPostProcessororg.springframework.beans.BeansExceptionpublic static void addListenerIfAutoRefreshed(NacosPropertySource nacosPropertySource, Properties properties, org.springframework.core.env.ConfigurableEnvironment environment)
public int getOrder()
HIGHEST_PRECEDENCE almost.getOrder in interface org.springframework.core.OrderedOrdered.HIGHEST_PRECEDENCE + 1ConfigurationClassPostProcessor.getOrder()public void setEnvironment(org.springframework.core.env.Environment environment)
setEnvironment in interface org.springframework.context.EnvironmentAwareCopyright © 2020. All rights reserved.