1
0
mirror of https://gitee.com/mirrors/Spring-Cloud-Alibaba.git synced 2021-06-26 13:25:11 +08:00

Polish #115 check ParamFlowRule

This commit is contained in:
fangjian0423 2018-12-14 18:10:49 +08:00
parent 5643c952a8
commit 20741db009

View File

@ -35,6 +35,8 @@ import com.alibaba.csp.sentinel.slots.block.degrade.DegradeRule;
import com.alibaba.csp.sentinel.slots.block.degrade.DegradeRuleManager;
import com.alibaba.csp.sentinel.slots.block.flow.FlowRule;
import com.alibaba.csp.sentinel.slots.block.flow.FlowRuleManager;
import com.alibaba.csp.sentinel.slots.block.flow.param.ParamFlowRule;
import com.alibaba.csp.sentinel.slots.block.flow.param.ParamFlowRuleManager;
import com.alibaba.csp.sentinel.slots.system.SystemRule;
import com.alibaba.csp.sentinel.slots.system.SystemRuleManager;
@ -55,7 +57,7 @@ public class SentinelDataSourceHandler {
private List<String> dataTypeList = Arrays.asList("json", "xml");
private List<Class> rulesList = Arrays.asList(FlowRule.class, DegradeRule.class,
SystemRule.class, AuthorityRule.class);
SystemRule.class, AuthorityRule.class, ParamFlowRule.class);
private List<String> dataSourceBeanNameList = Collections
.synchronizedList(new ArrayList<>());
@ -146,9 +148,12 @@ public class SentinelDataSourceHandler {
else if (ruleType == SystemRule.class) {
SystemRuleManager.register2Property(sentinelProperty);
}
else {
else if (ruleType == AuthorityRule.class) {
AuthorityRuleManager.register2Property(sentinelProperty);
}
else {
ParamFlowRuleManager.register2Property(sentinelProperty);
}
}
});
}