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