Sentinel
sentinel为独立的服务,为java编写的springboot项目
files目录中含有可执行jar包
gateway整合sentinel
1、pom.xml 引入依赖
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.csp</groupId>
<artifactId>sentinel-spring-cloud-gateway-adapter</artifactId>
<version>${sentinel.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
2.application配置
management:
endpoints:
web:
exposure:
include: '*'
3.sentinel配置
# 让sentinel识别为网关类型服务
csp.sentinel.app.type=1
4.启动sentinel
# 默认端口8080,可更改
java -jar sentinel-dashboard-1.8.1.jar --server.port=8888