nacos-spring-boot-project
nacos-spring-boot-project copied to clipboard
Nacos ECO Project for Spring Boot
同时引入nacos-discovery-spring-boot-starter和nacos-config-spring-boot-starter,如果不指定config的server_addr,NamingService的Properties也会变成本地ip+8848,会被影响。如果指定的config和naming 的server_addr的addr 会被后者覆盖,达不到想要的效果。 如图: 
nacos-config-spring-boot-starter:0.2.11  application.yml: nacos: config: bootstrap: enable: true data-id: data.json group: DEFAULT_GROUP type: json max-retry: 10 auto-refresh: true config-retry-time: 2333 config-long-poll-timeout: 46000 username: password: namespace: server-addr:
nacos-config-spring-boot-starter (version-0.2.8) yml文件开始预加载 bootstrap.enable & autoRefreshed:true 为什么不刷新配置呢?
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'nacosConfigurationPropertiesBinder': Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.alibaba.boot.nacos.config.binder.NacosBootConfigurationPropertiesBinder]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/springframework/boot/context/properties/ConfigurationBeanFactoryMetadata 2.4.1 ConfigurationBeanFactoryMetadata...
nacos 2.0.4 版本
#225 This solution will lead to thread safety problem. ```java @Override protected void doBind(Object bean, String beanName, String dataId, String groupId, String configType, NacosConfigurationProperties properties, String content, ConfigService configService) {...
0.2.5 3.0.1 2.19.1 3.1.0 1.1.0 UTF-8 com.alibaba.boot nacos-spring-boot-project ${revision}
在配置文件中可以不使用@NacosValue或者@Value,而是使用@ConfigurationProperties来对配置类进行赋值吗
SpringBoot+Dubbo项目,同时使用config和discovery功能。 期望config和discovery使用不同的namespace。结果discovery的配置不生效,使用了config的配置进行了注册。 config和discrovey对应配置文件:  对应的maven依赖:  断点discovery的注册是的NacosDiscoveryAutoRegister属性:  发现: namingService中获取的是config的配置文件值,而discoveryProperties是期望的值。 但是注册的时候使用的是namingService进行注册的。
目前这两个路径默认是用户的所在的目录:**/home/xxxx**