From d943377c00108faa5237076a95eea8d30aec12a3 Mon Sep 17 00:00:00 2001 From: tanghc Date: Mon, 15 Jun 2020 14:34:47 +0800 Subject: [PATCH] 3.2.0 --- doc/docs/files/10092_接口限流.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/doc/docs/files/10092_接口限流.md b/doc/docs/files/10092_接口限流.md index 2c36cd00..8f1c9ef8 100644 --- a/doc/docs/files/10092_接口限流.md +++ b/doc/docs/files/10092_接口限流.md @@ -67,15 +67,14 @@ spring.redis.host=127.0.0.1 spring.redis.port=6379 ``` -- ZuulConfig.java中添加如下代码: +- 在启动类中添加如下代码: ```java @Autowired private RedisTemplate redisTemplate; -@Override -protected void doAfter() { - super.doAfter(); +@PostConstruct +public void doAfter() { ApiConfig.getInstance().setLimitManager(new RedisLimitManager(redisTemplate)); } ```