2020
09-24
09-24
SpringCloud Zuul过滤器和谷歌Gauva实现限流
前提:已经配置Zuul网关参考:https://www.jb51.net/article/182894.htm限流方式:1)nginx层限流2)网关层限流1.添加限流过滤器importcom.alibaba.fastjson.JSON;importcom.google.common.util.concurrent.RateLimiter;importcom.netflix.zuul.ZuulFilter;importcom.netflix.zuul.context.RequestContext;importcom.netflix.zuul.exception.ZuulException;importorg.apache.commons.lang.StringUtils;importorg.springfram...
继续阅读 >