public class NacosValueAnnotationBeanPostProcessor extends com.alibaba.spring.beans.factory.annotation.AnnotationInjectedBeanPostProcessor<com.alibaba.nacos.api.config.annotation.NacosValue> implements org.springframework.beans.factory.BeanFactoryAware, org.springframework.context.EnvironmentAware, org.springframework.context.ApplicationListener<NacosConfigReceivedEvent>
BeanPostProcessor implementationNacosValue| Modifier and Type | Field and Description |
|---|---|
static String |
BEAN_NAME
The name of
NacosValueAnnotationBeanPostProcessor bean |
| Constructor and Description |
|---|
NacosValueAnnotationBeanPostProcessor() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
buildInjectedObjectCacheKey(com.alibaba.nacos.api.config.annotation.NacosValue annotation,
Object bean,
String beanName,
Class<?> injectedType,
org.springframework.beans.factory.annotation.InjectionMetadata.InjectedElement injectedElement) |
protected Object |
doGetInjectedBean(com.alibaba.nacos.api.config.annotation.NacosValue annotation,
Object bean,
String beanName,
Class<?> injectedType,
org.springframework.beans.factory.annotation.InjectionMetadata.InjectedElement injectedElement) |
void |
onApplicationEvent(NacosConfigReceivedEvent event) |
Object |
postProcessBeforeInitialization(Object bean,
String beanName) |
void |
setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) |
void |
setEnvironment(org.springframework.core.env.Environment environment) |
destroy, getAnnotationType, getBeanFactory, getClassLoader, getEnvironment, getInjectedFieldObjectsMap, getInjectedMethodObjectsMap, getInjectedObject, getInjectedObjects, getOrder, postProcessMergedBeanDefinition, postProcessPropertyValues, setBeanClassLoader, setOrderdetermineCandidateConstructors, getEarlyBeanReference, postProcessAfterInitialization, postProcessAfterInstantiation, postProcessBeforeInstantiation, predictBeanTypepublic static final String BEAN_NAME
NacosValueAnnotationBeanPostProcessor beanpublic NacosValueAnnotationBeanPostProcessor()
protected Object doGetInjectedBean(com.alibaba.nacos.api.config.annotation.NacosValue annotation, Object bean, String beanName, Class<?> injectedType, org.springframework.beans.factory.annotation.InjectionMetadata.InjectedElement injectedElement)
doGetInjectedBean in class com.alibaba.spring.beans.factory.annotation.AnnotationInjectedBeanPostProcessor<com.alibaba.nacos.api.config.annotation.NacosValue>protected String buildInjectedObjectCacheKey(com.alibaba.nacos.api.config.annotation.NacosValue annotation, Object bean, String beanName, Class<?> injectedType, org.springframework.beans.factory.annotation.InjectionMetadata.InjectedElement injectedElement)
buildInjectedObjectCacheKey in class com.alibaba.spring.beans.factory.annotation.AnnotationInjectedBeanPostProcessor<com.alibaba.nacos.api.config.annotation.NacosValue>public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
throws org.springframework.beans.BeansException
setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAwaresetBeanFactory in class com.alibaba.spring.beans.factory.annotation.AnnotationInjectedBeanPostProcessor<com.alibaba.nacos.api.config.annotation.NacosValue>org.springframework.beans.BeansExceptionpublic void setEnvironment(org.springframework.core.env.Environment environment)
setEnvironment in interface org.springframework.context.EnvironmentAwaresetEnvironment in class com.alibaba.spring.beans.factory.annotation.AnnotationInjectedBeanPostProcessor<com.alibaba.nacos.api.config.annotation.NacosValue>public Object postProcessBeforeInitialization(Object bean, String beanName) throws org.springframework.beans.BeansException
postProcessBeforeInitialization in interface org.springframework.beans.factory.config.BeanPostProcessorpostProcessBeforeInitialization in class org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessorAdapterorg.springframework.beans.BeansExceptionpublic void onApplicationEvent(NacosConfigReceivedEvent event)
onApplicationEvent in interface org.springframework.context.ApplicationListener<NacosConfigReceivedEvent>Copyright © 2020. All rights reserved.