Resilience4j插件
说明
resilience4j插件是网关用来对流量进行限流与熔断的可选选择之一。resilience4j为网关熔断限流提供能力。
插件设置
请参考运维部署的内容,选择一种方式启动shenyu-admin。比如,通过 本地部署 启动Apache ShenYu后台管理系统。
- 在 基础配置
-->插件管理-->resilience4j,设置为开启。 如果用户不使用,可以将其关闭。
在网关中引入 resilience4j 插件
- 在网关的
pom.xml文件中添加resilience4j的依赖。
<!-- apache shenyu resilience4j plugin start-->
<dependency>
<groupId>org.apache.shenyu</groupId>
<artifactId>shenyu-spring-boot-starter-plugin-resilience4j</artifactId>
<version>${project.version}</version>
</dependency>
<!-- apache shenyu resilience4j plugin end-->