taobao_model^2
tanghc 5 years ago
parent 007c52b174
commit d943377c00
  1. 7
      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));
}
```

Loading…
Cancel
Save