

#yyds干货盘点# springcloud整合Sentinel使用Nacos存储规则
source link: https://blog.51cto.com/u_13321676/4937408
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

#yyds干货盘点# springcloud整合Sentinel使用Nacos存储规则
原创灰太狼_cxh 2022-01-17 11:40:42 博主文章分类:springcloud学习系列 ©著作权
springcloud整合Sentinel使用Nacos存储规则, 在 #yyds干货盘点# springcloud整合Sentinel实现接口限流 基础代码上进行修改。
1.代码实现:
<groupId>com.alibaba.csp</groupId>
<artifactId>sentinel-datasource-nacos</artifactId>
<version>1.5.2</version>
</dependency>
yml配置
application:
name: sentinel
cloud:
sentinel:
transport:
dashboard: localhost:8080
datasource:
ds:
nacos:
server-addr: localhost:8848 #nacos的地址
dataId: ${spring.application.name}-sentinel
groupId: DEFAULT_GROUP
data-type: json
rule_type: flow
server:
port: 8001
2.实现效果:
启动nacos,浏览器打开 http://localhost:8848/nacos登录后再配置管理中的配置列表进行添加规则
启动sentinel-dashboard,浏览器打开 http://localhost:8080/ 使用默认用户密码:sentinel进行登录
启动sentinel项目,浏览器打开 http://localhost:8001/index, 然后刷新sentinel控制台页面,可以看到在nacos配置的规则在sentinel中的流控规则页面显示。
Recommend
-
24
-
47
-
38
随着微服务的流行,服务和服务之间的稳定性变得越来越重要。 Sentinel 以流量为切入点,从流量控制、熔断降级、系统负载保护等多个维度保护服务的稳定性。 Sentinel 具有以下特征: 丰富的应用场景: Sentinel...
-
8
什么是sentinel Sentinel,中文翻译为哨兵,是为微服务提供流量控制、熔断降级的功能,它和Hystrix提供的功能一样,可以有效的解决微服务调用产生的“雪崩”效应,为微服务系统提供了稳定性的解决方案。随着Hytrxi进入了维护期,...
-
9
阅读提醒: 本文面向的是有一定springboot基础者 本次教程使用的Spring Cloud Hoxton RELEASE版本 由于knife4j比swagger更加友好,所以本文集成knife4j 本文依赖上一篇的工程,请查看上一篇...
-
5
聊聊自定义SPI如何与sentinel整合实现熔断限流 - linyb极客之路的个人空间 - OSCHINA - 中文开源技术交流社区 OSCHINA 2021 中国开源开发者问卷 >...
-
8
#yyds干货盘点# springcloud整合eureka实现服务注册与发现 原创 灰太狼_cxh 2022-01-11 09:...
-
10
SpringCloud Alibaba Sentinel 限流详解
-
5
SpringCloud Alibaba Sentinel 限流详解 推荐 原创 牧小农 2022-05-29 1...
-
5
前期准备:启动nacos和sentinel提供者9003/9004 (以9003为样本)新建cloudalibaba-provider-payment9003/9004pom文件<?xml version="1.0" encoding="UTF-8"?><p...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK