初识Sentinel-微服务整合Sentinel

我们在order-service中整合Sentinel,并且连接Sentinel的控制台,步骤如下:
1.引入sentinel依赖:

<!--引入sentinel依赖-->
<dependency>
    <groupId>com.alibaba.cloud</groupId>
    <artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
</dependency>

 

2.配置控制台地址:

spring:
  cloud:
    sentinel:
      transport:
        dashboard: localhost:8080 # sentinel控制台地址

 

3.访问微服务的任意端点,触发sentinel监控

posted on 2021-10-05 13:52  Ruthless  阅读(246)  评论(0编辑  收藏  举报