添加 Maven


     <dependency>
         <groupId>com.alibaba.cloud</groupId>
         <artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
         <version>2.2.6.RELEASE</version>
     </dependency>



下载Sentinel客户端,并启动


Sentinel   

链接:https://pan.baidu.com/s/1ccsYCSMPyI1ab-cMTLRwXg   提取码:s8bf 

输入命令  java -Dserver.port=8082 -jar sentinel-dashboard-1.8.2.jar   


application.yml 中添加 Sentinel 连接


spring:
  cloud:
    sentinel:
      transport:
        dashboard: localhost:8082
      eager: true