public class NacosConfigListenerMethodProcessor extends AnnotationListenerMethodProcessor<com.alibaba.nacos.api.config.annotation.NacosConfigListener> implements org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationEventPublisherAware, org.springframework.context.EnvironmentAware
@NacosConfigListener method ProcessorNacosConfigListener,
AnnotationListenerMethodProcessor,
Method| 限定符和类型 | 字段和说明 |
|---|---|
static String |
BEAN_NAME
The bean name of
NacosConfigListenerMethodProcessor |
static String |
NACOS_CONFIG_CONVERSION_SERVICE_BEAN_NAME
The bean name of
ConversionService for Nacos Configuration |
logger| 构造器和说明 |
|---|
NacosConfigListenerMethodProcessor() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected boolean |
isCandidateMethod(Object bean,
Class<?> beanClass,
com.alibaba.nacos.api.config.annotation.NacosConfigListener listener,
Method method,
org.springframework.context.ApplicationContext applicationContext)
Subclass could override this method to determine current method is candidate or not
|
protected void |
processListenerMethod(String beanName,
Object bean,
Class<?> beanClass,
com.alibaba.nacos.api.config.annotation.NacosConfigListener listener,
Method method,
org.springframework.context.ApplicationContext applicationContext)
Process Listener Method when
AnnotationListenerMethodProcessor.isCandidateMethod(Object, Class, Annotation, Method, ApplicationContext)
returns true |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
void |
setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher) |
void |
setEnvironment(org.springframework.core.env.Environment environment) |
onApplicationEventpublic static final String BEAN_NAME
NacosConfigListenerMethodProcessorprotected void processListenerMethod(String beanName, Object bean, Class<?> beanClass, com.alibaba.nacos.api.config.annotation.NacosConfigListener listener, Method method, org.springframework.context.ApplicationContext applicationContext)
AnnotationListenerMethodProcessorAnnotationListenerMethodProcessor.isCandidateMethod(Object, Class, Annotation, Method, ApplicationContext)
returns trueprocessListenerMethod 在类中 AnnotationListenerMethodProcessor<com.alibaba.nacos.api.config.annotation.NacosConfigListener>beanName - Bean namebean - Bean objectbeanClass - Bean Classlistener - Annotation objectmethod - MethodapplicationContext - ApplicationContextprotected boolean isCandidateMethod(Object bean, Class<?> beanClass, com.alibaba.nacos.api.config.annotation.NacosConfigListener listener, Method method, org.springframework.context.ApplicationContext applicationContext)
AnnotationListenerMethodProcessorisCandidateMethod 在类中 AnnotationListenerMethodProcessor<com.alibaba.nacos.api.config.annotation.NacosConfigListener>bean - Bean objectbeanClass - Bean Classlistener - Annotation objectmethod - MethodapplicationContext - ApplicationContexttrue as defaultpublic void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext 在接口中 org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionpublic void setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher)
setApplicationEventPublisher 在接口中 org.springframework.context.ApplicationEventPublisherAwarepublic void setEnvironment(org.springframework.core.env.Environment environment)
setEnvironment 在接口中 org.springframework.context.EnvironmentAwareCopyright © 2021. All rights reserved.