zl程序教程

您现在的位置是:首页 >  其他

当前栏目

初识Sentinel-微服务整合Sentinel

服务 整合 初识 sentinel
2023-09-27 14:29:10 时间

我们在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监控