17、sentinel-规则持久化

在order-sentinel模块里添加依赖

   <dependency>
        <groupId>com.alibaba.csp</groupId>
        <artifactId>sentinel-datasource-nacos</artifactId>
    </dependency>

在这里插入图片描述

server:
  port: 8088
spring:
  application:
    name: order-sentinel
  cloud:
    sentinel:
      transport:
        dashboard: 127.0.0.1:8080
      web-context-unify: false #默认将调用链路收敛
      datasource:
        flow-rule: # 自定义名称
          nacos:
            server-addr: 127.0.0.1:8847
            username: nacos
            password: nacos
            dataId: order-sentinel-flow-rule
            rule-type: flow

版权声明:本文为weixin_43472934原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。