public class AnnotationNacosInjectedBeanPostProcessor extends AbstractAnnotationBeanPostProcessor implements org.springframework.beans.factory.InitializingBean
AnnotationInjectedBeanPostProcessor implementation is used to inject
ConfigService or NamingService instance into a Spring Bean If it's
attributes or properties annotated @NacosInjected.AbstractAnnotationBeanPostProcessor.AnnotatedFieldElement| 限定符和类型 | 字段和说明 |
|---|---|
static String |
BEAN_NAME
The name of
AnnotationNacosInjectedBeanPostProcessor |
| 构造器和说明 |
|---|
AnnotationNacosInjectedBeanPostProcessor() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
afterPropertiesSet() |
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.
|
destroy, doGetAnnotationAttributes, getAnnotationType, getAnnotationTypes, getBeanFactory, getClassLoader, getEnvironment, getInjectedFieldObjectsMap, getInjectedMethodObjectsMap, getInjectedObject, getInjectedObjects, getOrder, postProcessMergedBeanDefinition, postProcessProperties, setBeanClassLoader, setBeanFactory, setClassValuesAsString, setEnvironment, setIgnoreDefaultValue, setNestedAnnotationsAsMap, setOrder, setTryMergedAnnotationclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpostProcessAfterInstantiation, postProcessBeforeInstantiation, postProcessPropertyValuespublic static final String BEAN_NAME
AnnotationNacosInjectedBeanPostProcessorpublic final void afterPropertiesSet()
afterPropertiesSet 在接口中 org.springframework.beans.factory.InitializingBeanprotected 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.InjectedElementCopyright © 2023. All rights reserved.