mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-08-11 21:57:56 +08:00
4.4.0
This commit is contained in:
@@ -65,15 +65,16 @@ spring.redis.host=127.0.0.1
|
|||||||
spring.redis.port=6379
|
spring.redis.port=6379
|
||||||
```
|
```
|
||||||
|
|
||||||
- 在启动类中添加如下代码:
|
- 在`com.gitee.sop.gateway.config.MyConfig`中添加如下代码:
|
||||||
|
|
||||||
```java
|
```java
|
||||||
@Autowired
|
@Autowired
|
||||||
private RedisTemplate redisTemplate;
|
private RedisTemplate redisTemplate;
|
||||||
|
|
||||||
@PostConstruct
|
@PostConstruct
|
||||||
public void doAfter() {
|
public void after() {
|
||||||
ApiConfig.getInstance().setLimitManager(new RedisLimitManager(redisTemplate));
|
ApiConfig.getInstance().setLimitManager(new RedisLimitManager(redisTemplate));
|
||||||
|
...
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user