optimize: flowControl property is not necessary (#31)
optimize: flowControl property is not necessary
This commit is contained in:
@@ -20,6 +20,7 @@ package we.config;
|
||||
import com.alibaba.nacos.api.config.annotation.NacosValue;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.data.redis.core.ReactiveStringRedisTemplate;
|
||||
@@ -73,7 +74,8 @@ public class FlowStatSchedConfig extends SchedConfig {
|
||||
@Value("${flowControl:false}")
|
||||
private boolean flowControl;
|
||||
|
||||
@Resource
|
||||
// @Resource
|
||||
@Autowired(required = false)
|
||||
private FlowStat flowStat;
|
||||
|
||||
@Resource
|
||||
|
||||
@@ -20,6 +20,7 @@ package we.controller;
|
||||
import com.alibaba.nacos.api.config.annotation.NacosValue;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@@ -55,7 +56,8 @@ public class FlowControlController {
|
||||
@Value("${flowControl:false}")
|
||||
private boolean flowControl;
|
||||
|
||||
@Resource
|
||||
// @Resource
|
||||
@Autowired(required = false)
|
||||
private FlowStat flowStat;
|
||||
|
||||
@GetMapping("/globalConcurrentsRps")
|
||||
|
||||
@@ -24,6 +24,7 @@ import javax.annotation.Resource;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
@@ -65,7 +66,8 @@ public class FlowControlFilter extends ProxyAggrFilter {
|
||||
@Resource
|
||||
private ResourceRateLimitConfigService resourceRateLimitConfigService;
|
||||
|
||||
@Resource
|
||||
// @Resource
|
||||
@Autowired(required = false)
|
||||
private FlowStat flowStat;
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user