public class NacosValueAnnotationBeanPostProcessor extends AbstractAnnotationBeanPostProcessor implements org.springframework.beans.factory.BeanFactoryAware, org.springframework.context.EnvironmentAware, org.springframework.context.ApplicationListener<NacosConfigReceivedEvent>
NacosValue
BeanPostProcessor implementation.NacosValueAbstractAnnotationBeanPostProcessor.AnnotatedFieldElement| 限定符和类型 | 字段和说明 |
|---|---|
static String |
BEAN_NAME
The name of
NacosValueAnnotationBeanPostProcessor bean. |
| 构造器和说明 |
|---|
NacosValueAnnotationBeanPostProcessor() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected String |
buildInjectedObjectCacheKey(org.springframework.core.annotation.AnnotationAttributes attributes,
Object bean,
String beanName,
Class<?> injectedType,
org.springframework.beans.factory.annotation.InjectionMetadata.InjectedElement injectedElement)
Build a cache key for injected-object.
|
protected Object |
doGetInjectedBean(org.springframework.core.annotation.AnnotationAttributes attributes,
Object bean,
String beanName,
Class<?> injectedType,
org.springframework.beans.factory.annotation.InjectionMetadata.InjectedElement injectedElement)
Subclass must implement this method to get injected-object.
|
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, doGetAnnotationAttributes, getAnnotationType, getAnnotationTypes, getBeanFactory, getClassLoader, getEnvironment, getInjectedFieldObjectsMap, getInjectedMethodObjectsMap, getInjectedObject, getInjectedObjects, getOrder, postProcessMergedBeanDefinition, postProcessProperties, setBeanClassLoader, setClassValuesAsString, setIgnoreDefaultValue, setNestedAnnotationsAsMap, setOrder, setTryMergedAnnotationclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpostProcessAfterInstantiation, postProcessBeforeInstantiation, postProcessPropertyValuespublic static final String BEAN_NAME
NacosValueAnnotationBeanPostProcessor bean.public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
throws org.springframework.beans.BeansException
setBeanFactory 在接口中 org.springframework.beans.factory.BeanFactoryAwaresetBeanFactory 在类中 AbstractAnnotationBeanPostProcessororg.springframework.beans.BeansExceptionpublic void setEnvironment(org.springframework.core.env.Environment environment)
setEnvironment 在接口中 org.springframework.context.EnvironmentAwaresetEnvironment 在类中 AbstractAnnotationBeanPostProcessorprotected Object doGetInjectedBean(org.springframework.core.annotation.AnnotationAttributes attributes, Object bean, String beanName, Class<?> injectedType, org.springframework.beans.factory.annotation.InjectionMetadata.InjectedElement injectedElement) throws Exception
AbstractAnnotationBeanPostProcessordoGetInjectedBean 在类中 AbstractAnnotationBeanPostProcessorattributes - the annotation attributesbean - Current bean that will be injectedbeanName - Current bean name that will be injectedinjectedType - the type of injected-objectinjectedElement - InjectionMetadata.InjectedElementException - If resolving an injected object is failed.protected String buildInjectedObjectCacheKey(org.springframework.core.annotation.AnnotationAttributes attributes, Object bean, String beanName, Class<?> injectedType, org.springframework.beans.factory.annotation.InjectionMetadata.InjectedElement injectedElement)
AbstractAnnotationBeanPostProcessorbuildInjectedObjectCacheKey 在类中 AbstractAnnotationBeanPostProcessorattributes - the annotation attributesbean - Current bean that will be injectedbeanName - Current bean name that will be injectedinjectedType - the type of injected-objectinjectedElement - InjectionMetadata.InjectedElementpublic Object postProcessBeforeInitialization(Object bean, String beanName) throws org.springframework.beans.BeansException
postProcessBeforeInitialization 在接口中 org.springframework.beans.factory.config.BeanPostProcessororg.springframework.beans.BeansExceptionpublic void onApplicationEvent(NacosConfigReceivedEvent event)
onApplicationEvent 在接口中 org.springframework.context.ApplicationListener<NacosConfigReceivedEvent>Copyright © 2023. All rights reserved.