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

refactor import in greenwich

This commit is contained in:
fangjian0423
2019-10-30 17:51:53 +08:00
parent 5c41218c5f
commit 64bd2067a7
213 changed files with 1067 additions and 1010 deletions

View File

@@ -2,17 +2,17 @@ package com.alibaba.cloud.examples;
import java.util.Collections;
import com.alibaba.csp.sentinel.slots.block.RuleConstant;
import com.alibaba.csp.sentinel.slots.block.SentinelRpcException;
import com.alibaba.csp.sentinel.slots.block.flow.FlowRule;
import com.alibaba.csp.sentinel.slots.block.flow.FlowRuleManager;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import com.alibaba.csp.sentinel.slots.block.RuleConstant;
import com.alibaba.csp.sentinel.slots.block.SentinelRpcException;
import com.alibaba.csp.sentinel.slots.block.flow.FlowRule;
import com.alibaba.csp.sentinel.slots.block.flow.FlowRuleManager;
/**
* @author fangjian
*/
@@ -27,7 +27,8 @@ public class SentinelDubboConsumerApp {
public static void main(String[] args) {
FlowRule flowRule = new FlowRule();
flowRule.setResource("com.alibaba.cloud.examples.FooService:hello(java.lang.String)");
flowRule.setResource(
"com.alibaba.cloud.examples.FooService:hello(java.lang.String)");
flowRule.setCount(10);
flowRule.setGrade(RuleConstant.FLOW_GRADE_QPS);
flowRule.setLimitApp("default");