NacosPropertySource Builder"${nacos.config.access-key:${nacos.access-key:}}""${nacos.discovery.access-key:${nacos.access-key:}}"NacosPropertySource.after()method ProcessorAnnotationInjectedBeanPostProcessor implementation is used to inject
ConfigService or NamingService instance into a Spring Bean If it's
attributes or properties annotated @NacosInjected.@NacosPropertySource
BuilderNacosPropertySource.autoRefreshed()AnnotationNacosInjectedBeanPostProcessorConfigServiceBeanBuilderNamingServiceBeanBuilderNamingServiceBeanBuilderNacosConfigListenerMethodProcessorNacosValueAnnotationBeanPostProcessor beanLoggingNacosConfigMetadataEventListenerNacosConfigurationPropertiesBindingPostProcessor BeanAnnotationNacosPropertySourceBuilderNacosPropertySourcePostProcessorXmlNacosPropertySourceBuilderNacosServiceFactoryNacosPropertySource.before()NacosPropertySource from BeanDefinition@NacosPropertySourceNacosServiceFactory"${nacos.config.cluster-name:${nacos.cluster-name:}}""${nacos.discovery.cluster-name:${nacos.cluster-name:}}"Properties for configconfigLongPollTimeout, the value is "${nacos.configLongPollTimeout:}"configRetryTime, the
value is "${nacos.configRetryTime:}"NacosPropertySource.type() ()}ConfigService Bean Builder"${nacos.config.context-path:${nacos.context-path:}}""${nacos.discovery.context-path:${nacos.context-path:}}"ConfigService instanceNamingMaintainService instanceNamingService instanceNacosPropertySource.dataId()AnnotationString attribute for AnnotationString attribute for AnnotationNacosConfigConverter implementationApplicationEventPublisher to resolve
DeferredApplicationEventPublisher.publishEvent(ApplicationEvent) too early to publish ApplicationEvent
when Spring
ApplicationContexts' ApplicationEventMulticaster is not ready, thus current class will
hold all early events temporary until
Spring ApplicationContext is active,
and then those events will be replayed.Event Publishing Listener of
Nacos Config Listener with dataId, groupId and ConfigService instance.Properties for discoveryencode, the value is
"${nacos.config.encode:${nacos.encode:UTF-8}}"encode, the value is
"${nacos.discovery.encode:${nacos.encode:UTF-8}}""${nacos.config.endpoint:${nacos.endpoint:}}""${nacos.discovery.endpoint:${nacos.endpoint:}}"Event publishing ConfigServiceNacosPropertySource.first()Bean DefinitionConfigServiceConfigServiceBeanBuilder BeanConfigServiceConfigService via dataId and groupIdProperties from BeanFactoryExecutor Bean for Nacos Config Listener If PresentPropertiesNacosServiceFactory BeanNamingMaintainServiceNamingMaintainServiceBeanBuilder BeanNamingServiceBeanBuilder BeanNamingServiceHIGHEST_PRECEDENCE almost.Properties for Nacos ServiceResource for XML configurationPropertiesProperties BeanDefinitionParser for
<nacos:global-properties ...>NacosPropertiesNacosPropertySource.groupId()Nacos Properties annotationNacos PropertiesNacosPropertySourcePostProcessorBeanDefinition present in BeanDefinitionRegistry@NacosProperties with default attribute values.ConfigService.publishConfig(String, String, String) method executing
result.ConfigService.removeConfig(String, String) method
executing result.NacosPropertiesacos PropertiesNacosConfigMetadataEvent ApplicationListenerProperties for maintainmaxRetry, the value is
"${nacos.maxRetry:}"ConversionService for Nacos ConfigurationExecutor for Nacos Config ListenerBeanDefinitionParser for XML element
<nacos:annotation-driven/>BeanDefinition RegistrarBeanDefinition Registrar@NacosConfigListener method ProcessorNacos Config Listener registered eventeventevent of Nacos Configuration that has been published.event of Nacos Configuration that has been changed.event of Nacos Configuration that has been removed.Nacos config event for
getting timeout.NacosConfigurationProperties Bean Bound event.NacosConfigurationProperties Bean BinderNacosConfigurationProperties Binding BeanPostProcessorBeanDefinition RegistrarNamespaceHandlerPropertySourcePropertySource, all read methods are immutable.BeanDefinitionParser for <nacos:property-source
...>Post Processor resolves
@NacosPropertySource
or @NacosPropertySources or
NacosPropertySourceXmlBeanDefinition to be PropertySource, and append
into Spring PropertySources @NacosPropertySource annotations.PropertySource XML BeanDefinitionBeanPostProcessor implementationNacosPropertySource.name()"${nacos.config.namespace:${nacos.namespace:}}""${nacos.discovery.namespace:${nacos.namespace:}}"NamingService Bean Builder"${nacos.config.password:${nacos.password:}}""${nacos.discovery.password:${nacos.password:}}"PropertySourcesPlaceholderConfigurerAnnotationListenerMethodProcessor.isCandidateMethod(Object, Class, Annotation, Method, ApplicationContext)
returns trueNacosPropertySource.properties()propertiesPropertySourcesPlaceholderConfigurer BeanannotationpropertiesBeanFactory from BeanDefinitionRegistryProperties from @NacosPropertiesProperties from @NacosPropertiesPropertyResolver if
present"${nacos.config.secret-key:${nacos.secret-key:}}""${nacos.discovery.secret-key:${nacos.secret-key:}}""${nacos.config.server-addr:${nacos.server-addr:}}""${nacos.discovery.server-addr:${nacos.server-addr:}}"BeanDefinition supports or notNacos Config Listener"${nacos.config.username:${nacos.username:}}""${nacos.discovery.username:${nacos.username:}}"Copyright © 2020. All rights reserved.