采用版本
nacos:2.2.1.RELEASE
@RefreshScope不能加在启动类,只能加在需要动态配置类上,同时需引入动态刷新配置,忽略权限拦截
spring:
application:
name: anyouliang-user
cloud:
nacos:
config:
server-addr: 192.168.101.22:8848,192.168.101.23:8848,192.168.101.24:8848
namespace: 8d4e6351-80a8-45f6-b120-3acc4c5cbf2b
file-extension: yml
group: user-service
username: nacos
password: nacos
#动态刷新配置 ---需要忽略权限拦截
management:
endpoints:
web:
exposure:
include: refresh