##公共配置 server: svr-configurations-port: 1221 svr-discovery-port: 8761 svr-base-port: 10020 web-gateway-port: 8088 #发现服务 eureka: client: healthcheck: enabled: true #启动监控检查 instance: #eurika使用IP不使用host prefer-ip-address: true #定制化在eurika中显示的名称 instance-id: ${spring.application.name}:${spring.application.instance_id:${server.port}} ##优先读取 boostarap配置 然后在读取application。yml的配置 spring: #从发现服务里面取配置服务的信息 cloud: config: username: jw password: jkzl discovery: enabled: true ##使用发现服务 service-id: svr-configurations ##配置服务的名字 --- spring: profiles: dev eureka: client: serviceUrl: #http://账号:密码@127.0.0.1:8761/eureka/ defaultZone: http://jw:jkzl@127.0.0.1:8761/eureka/ --- spring: profiles: test eureka: client: serviceUrl: #http://账号:密码@127.0.0.1:8761/eureka/ defaultZone: http://jw:jkzl@127.0.0.1:8761/eureka/ --- spring: profiles: prod eureka: client: serviceUrl: #http://账号:密码@127.0.0.1:8761/eureka/ defaultZone: http://jw:jkzl@127.0.0.1:8761/eureka/