Spring Cloud Alibaba整合Sentinel只需要两步
第一步:引入pom依赖
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
第二步:在添加appliation.yml
中添加配置
spring:
application:
name: business-edu
main:
allow-bean-definition-overriding: true
##nacos 注册中心
cloud:
nacos:
discovery:
server-addr: 127.0.0.1:8848
sentinel:
transport:
dashboard: 127.0.0.1:8080
port: 8719 #默认8719,假如被占用了会自动从8719开始依次+1扫描。直至找到未被占用的端口