spring:
  rabbitmq:
    username: admin
    password: admin
    host: 10.10.10.138
    port: 5672
    virtual-host: /
  cloud:
    nacos:
      discovery:
        # 服务注册地址
        #        server-addr: 47.108.162.14:8848
        server-addr: 127.0.0.1:8848
        # 命名空间
        namespace: sckw-service-platform-dev
        # nacos用户名
        username: nacos
        # nacos密码
        password: nacos
        # 共享配置
        group: sckw-service-platform
        # 权重 1-100 数值越大权重越大分配的流量就越大，通常结合权重负载均衡策略
      #        weight: 100
      config:
        # 配置中心地址
        #        server-addr: 47.108.162.14:8848
        server-addr: 127.0.0.1:8848
        # 配置文件格式
        file-extension: yaml
        # 命名空间
        namespace: sckw-service-platform-dev
        # 共享配置
        group: sckw-service-platform
        enabled: true
    # sentinel降级配置
    sentinel:
      transport:
        client-ip: ${spring.cloud.client.ip-address} # 获取本机IP地址
        port: 8719  #默认8719端口,如果被占用会向上扫描。
        #控制台地址 配置(项目pom与sentinel都应配置一致)
        #dashboard: 47.108.162.14:19527
        dashboard: 127.0.0.1:19527
      log:
        #日志路径
        dir: logs/sentinel
        # 默认将调用链路收敛，导致链路流控效果无效
        web-context-unify: false
        #持久化nacos配置中
      datasource:
        #sentinel-rule: # 唯一名称可自定义
        #限流
        flow:
          nacos:
            # 设置Nacos的连接地址、命名空间和Group ID
            namespace:  sckw-service-platform-dev
            server-addr:  ${spring.cloud.nacos.discovery.server-addr}
            # username: ${spring.cloud.nacos.discovery.username}
            # password: ${spring.cloud.nacos.discovery.password}
            # 设置Nacos中配置文件的命名规则 在sentinel中规则后缀保持一致
            # data-id:  ${spring.application.name}-sentinel-flow-rules
            data-id:  sckw-example-sentinel-flow-rules
            group-id: SENTINEL_GROUP
            data-type: json
            # 必填的重要字段，指定当前规则类型是"限流"
            rule-type: flow
        #熔断
        degrade:
          nacos:
            namespace:  sckw-service-platform-dev
            server-addr: ${spring.cloud.nacos.discovery.server-addr}
            #data-id: ${spring.application.name}-sentinel-degrade-rules 在sentinel中规则后缀保持一致
            data-id: sckw-example-sentinel-degrade-rules
            group-id: SENTINEL_GROUP
            #熔断
            rule-type: degrade
      #取消慢加载
      eager: true
  datasource:
    dynamic:
      seata: true
seata:
  # seata 服务分组，要与服务端nacos-config.txt中service.vgroup_mapping的后缀对应
  # 事务分组名称，要和服务端对应
  tx-service-group: example-seata-group
  service:
    vgroup-mapping:
      # key是事务分组名称 value要和服务端的机房名称保持一致
      example-seata-group: default
  registry:
    # 指定nacos作为注册中心
    type: nacos
    nacos:
      server-addr: ${spring.cloud.nacos.discovery.server-addr}
      #server-addr: 47.108.162.14:8848
      namespace: ${spring.cloud.nacos.discovery.namespace}
      #      group: SEATA_GROUP
      group: ${spring.cloud.nacos.discovery.group}
  config:
    # 指定nacos作为配置中心
    type: nacos
    nacos:
      server-addr: ${spring.cloud.nacos.discovery.server-addr}
      #server-addr: 47.108.162.14:8848
      namespace: ${spring.cloud.nacos.discovery.namespace}
      group: ${spring.cloud.nacos.discovery.group}
  application-id: ${spring.application.name}
#  application-id: sckw-seata-file
# 支持feign对sentinel支持
#feign:
#  sentinel:
#    enabled: true

dubbo:
  application:
    # 此处没有延用spring.application.name是因为当前项目本身也会注册到nacos中，如果dubbo也延用相同的名称，在nacos服务里会看到注册的producer-server服务数为2
    name: example-dubbo-server
  protocol:
    name: dubbo
    port: -1
    prefer-serialization: java
  registry:
    # 配置dubbo的注册中心为nacos
    address: nacos://${spring.cloud.nacos.discovery.server-addr}
    group: ${spring.cloud.nacos.config.group}
    protocol: nacos
    #use-as-config-center: false
    #use-as-metadata-center: false
