nacos指定外网ip

server:
  port: 4000

spring:
  application:
    name: @artifactId@
  servlet:
      multipart:
        max-file-size: 5MB
  cloud:
    nacos:
      discovery:
        #指定注册ip
        ip: ${pig-upms-biz.ip}
        server-addr: ${NACOS-HOST:pg-register}:${NACOS-PORT:8848}
      config:
        server-addr: ${spring.cloud.nacos.discovery.server-addr}
        file-extension: yml
        shared-configs:
          - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
  profiles:
    active: @profiles.active@

 参照地址: https://www.jianshu.com/p/64e1f7d50c6e

你可能感兴趣的:(SpringCloud)