spring:
  application:
    name: order-service
  
  cloud:
    nacos:
      config:
        server-addr: ${NACOS_SERVER_ADDR:localhost:8848}
        namespace: ${NACOS_NAMESPACE:public}
        group: ${NACOS_GROUP:DEFAULT_GROUP}
        file-extension: yaml
        shared-configs:
          - data-id: common-config.yaml
            group: DEFAULT_GROUP
            refresh: true
          - data-id: datasource-config.yaml
            group: DEFAULT_GROUP
            refresh: true
          - data-id: redis-config.yaml
            group: DEFAULT_GROUP
            refresh: true
        extension-configs:
          - data-id: order-service-config.yaml
            group: DEFAULT_GROUP
            refresh: true
      
      discovery:
        server-addr: ${NACOS_SERVER_ADDR:localhost:8848}
        namespace: ${NACOS_NAMESPACE:public}
        group: ${NACOS_GROUP:DEFAULT_GROUP}
        metadata:
          version: 1.0.0
          zone: ${ZONE:zone1}
        
  config:
    import:
      - optional:nacos:common-config.yaml
      - optional:nacos:datasource-config.yaml
      - optional:nacos:redis-config.yaml
      - optional:nacos:order-service-config.yaml

# 激活配置文件
profiles:
  active: ${PROFILE:dev}
