# 先从环境变量里取，若不存在，则以 maven 打包时的配置为准
shoulder:
  nacos:
    ip: ${NACOS_IP:@nacos.ip@}
    port: ${NACOS_PORT:@nacos.port@}
    namespace: ${NACOS_ID:@nacos.namespace@}

# spring-boot-actuate 展示信息
info:
  name: "@project.name@"
  description: "@project.description@"
  version: "@project.version@"
  spring-boot-version: ${spring-boot.version}
  spring-cloud-version: ${spring-cloud.version}
  shoulder-version: "@shoulder.version@"
  profile: "@profile.active@"

# ==================================  配置正文  ================================
spring:
  #allow-bean-definition-overriding: true
  application:
    name: ${info.name}
  profiles:
    active: ${info.profile}
  cloud:
    nacos:
      config:
        server-addr: ${shoulder.nacos.ip}:${shoulder.nacos.port}
        file-extension: yml
        namespace: ${shoulder.nacos.namespace}
        shared-configs:
          - dataId: common.yml
            refresh: true
          - dataId: ${spring.application.name}.yml
            refresh: true
          - dataId: redis.yml
            refresh: false
          - dataId: db.yml
            refresh: true
          - dataId: mq-rabbitmq.yml
            refresh: false
        enabled: true

      discovery:
        server-addr: ${shoulder.nacos.ip}:${shoulder.nacos.port}
        namespace: ${shoulder.nacos.namespace}
        metadata:
          management.context-path: ${server.servlet.context-path:}${spring.mvc.servlet.path:}${management.endpoints.web.base-path:}

boot:
  admin:
    client:
      url: localhost:12365
      #username:
      #password:
      instance:
        prefer-ip: true
        service-url: localhost:8080