当前位置: 首页 > news >正文

spring boot 整合 sentinel

注意版本问题

我这是jdk11 、spring boot 2.7.15 、  alibaba-sentinel  2.1.2.RELEASE

<parent><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-parent</artifactId><version>2.7.15</version><relativePath/> <!-- lookup parent from repository --></parent>
<!-- sentinel客户端与dashboard通信依赖 --><dependency><groupId>com.alibaba.cloud</groupId><artifactId>spring-cloud-starter-alibaba-sentinel</artifactId><version>2.1.2.RELEASE</version></dependency>
# sentinel-dashboard地址
spring.cloud.sentinel.transport.dashboard=localhost:8080
spring.cloud.sentinel.transport.port=8080
spring.cloud.sentinel.eager=true
spring.main.allow-circular-references=true# 开启feign对sentinel的支持
feign.sentinel.enabled=true
@Override@SentinelResource(value = "helloAnother", blockHandler = "defaultFallback")
public String helloAnother(String name) {//xxxxxxxx
}

helloAnother 方法名写的这个   sentinel 面板上 资源名也要找到这个名称 。

defaultFallback 这是熔断后的方法名称
http://www.lryc.cn/news/388953.html

相关文章:

  • 蜜雪冰城小程序逆向
  • pbootcms提交留言成功后跳转到指定的网址
  • 16、matlab求导、求偏导、求定积分、不定积分、数值积分和数值二重积分
  • MySQL 9.0创新版发布!功能又进化了!
  • 后端系统的安全性
  • .net 百度翻译接口核心类
  • 安卓应用开发学习:通过腾讯地图SDK实现定位功能
  • iptable精讲
  • 2024 年如何构建 AI 软件
  • Python实战,桌面小游戏,剪刀石头布
  • Hadoop权威指南-读书笔记-01-初识Hadoop
  • HttpServletResponse设置headers返回,发现headers中缺少“Content-Length“和“Content-Type“两个参数。
  • GraphPad Prism生物医学数据分析软件下载安装 GraphPad Prism轻松绘制各种图表
  • 7/1 uart
  • zdppy_api+vue3+antd开发前后端分离的预加载卡片实战案例
  • 别小看手机导航,这些隐藏功能大部分人可能都不知道
  • Lua实现链表(面向对象应用)
  • 每隔一个小时gc一次的问题
  • VBA数据库解决方案第十二讲:如何判断数据库中数据表是否存在
  • 五、Spring IoCDI ★ ✔
  • 计算机网络八股文
  • 科普文:一文搞懂jvm原理(四)运行时数据区
  • 《昇思25天学习打卡营第5天|数据变换 Transforms》
  • 详细分析Oracle修改默认的时间格式(四种方式)
  • 以 Vue 3 项目为例,你是否经常遇到 import 语句顺序混乱的问题?要想解决它其实很容易!
  • mysql数据库ibdata文件被误删后恢复数据的方法
  • eBPF技术揭秘:DeepFlow如何引领故障排查,提升运维效率
  • C++视觉开发 三.缺陷检测
  • 使用 Amazon Bedrock Converse API 简化大语言模型交互
  • 第二十一章 函数(Python)