pull/11/MERGE
tanghc 4 years ago
parent c8fb583c7a
commit bf977b2218
  1. 5
      doc/docs/files/10092_接口限流.md

@ -65,15 +65,16 @@ spring.redis.host=127.0.0.1
spring.redis.port=6379
```
- 在启动类中添加如下代码:
- 在`com.gitee.sop.gateway.config.MyConfig`中添加如下代码:
```java
@Autowired
private RedisTemplate redisTemplate;
@PostConstruct
public void doAfter() {
public void after() {
ApiConfig.getInstance().setLimitManager(new RedisLimitManager(redisTemplate));
...
}
```

Loading…
Cancel
Save