Modify helloworld demo of README

This commit is contained in:
xg1907 2018-07-27 16:53:57 +08:00 committed by Eric Zhao
parent 934816b9ab
commit d727f1cfb0
1 changed files with 2 additions and 1 deletions

View File

@ -79,9 +79,10 @@ If we want to limit the access times of the resource, we can define rules. The f
```java ```java
List<FlowRule> rules = new ArrayList<FlowRule>(); List<FlowRule> rules = new ArrayList<FlowRule>();
FlowRule rule = new FlowRule(); FlowRule rule = new FlowRule();
rule.setResource("hello world"); rule.setResource("HelloWorld");
// set limit qps to 20 // set limit qps to 20
rule.setCount(20); rule.setCount(20);
rule.setGrade(RuleConstant.FLOW_GRADE_QPS);
rules.add(rule); rules.add(rule);
FlowRuleManager.loadRules(rules); FlowRuleManager.loadRules(rules);
``` ```