nacos作为配置中心 - nacos配置中心的 dataid 需要正确 ${prefix}-${spring.profiles.active}.${yaml||properties} - nacos位置在虚拟机中时,注意虚拟机端口映射以及虚拟机防火墙端口放行 8848/9848/9849 - @Value @ConfigurationProperties都可以读取配置 - bean使用@RefreshScope注解 - 使用@ConfigurationProperties时对应的bean应该存在getter、setter方法 - @EnableDiscoveryClient作为注册发现服务的注解,使用配置中心时,不使用该注解也不影响 - nacos版本问题:1.4.8无法正常运行, 2.5.0正常运行 - pom spring-cloud-starter-alibaba-nacos-config 2.2.7.RELEASE