nacos 配置了gateway.json
[
{
"id": "blade-system",
"order": 0,
"predicates": [
{
"name": "Path",
"args": {
"pattern": "/blade-system/**"
}
}
],
"filters": [
{
"name":"RequestRateLimiter",
"args": {
"key-resolver": "#{@pathKeyResolver}",
"redis-rate-limiter.replenishRate":"0",
" redis-rate-limiter.burstCapacity":"0"
}
}
],
"uri": "http://blade-system"
}
]
2.限流bean
3.启动调用接口限流不生效
现在bladex的限流都是通过sentinel来操作了,Gateway配置的问题很多而且不灵活所以不推荐了。
sentinel限流可以参考:https://github.com/alibaba/Sentinel/wiki/%E4%BB%8B%E7%BB%8D
扫一扫访问 Blade技术社区 移动端