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

polish #761 update pkg name & maven coordinate for Greenwich

This commit is contained in:
fangjian0423
2019-07-23 11:03:04 +08:00
parent 3998ea23f7
commit 883c66f251
599 changed files with 4993 additions and 4526 deletions

View File

@@ -50,7 +50,7 @@ Provider端在application.properties文件中定义dubbo相关的配置比如
foo.service.version = 1.0.0
dubbo.scan.basePackages = org.springframework.cloud.alibaba.cloud.examples
dubbo.scan.basePackages = com.alibaba.cloud.examples
dubbo.application.id = dubbo-provider-demo
dubbo.application.name = dubbo-provider-demo
@@ -66,7 +66,7 @@ Provider端在application.properties文件中定义dubbo相关的配置比如
`sentinel-dubbo-api`模块中定义了FooService服务内容如下
package org.springframework.cloud.alibaba.cloud.examples.FooService;
package FooService;
public interface FooService {
String hello(String name);
}
@@ -93,17 +93,17 @@ Consumer端在服务调用之前先定义限流规则。
`sentinel-dubbo-api`模块中定义了FooService服务内容如下
package org.springframework.cloud.alibaba.cloud.examples.FooService;
package FooService;
public interface FooService {
String hello(String name);
}
该服务在Sentinel下对应的资源名是 `org.springframework.cloud.alibaba.cloud.examples.dubbo.FooService:hello(java.lang.String)`
该服务在Sentinel下对应的资源名是 `com.alibaba.cloud.examples.FooService:hello(java.lang.String)`
定义该资源名对应的限流规则:
FlowRule flowRule = new FlowRule();
flowRule.setResource("org.springframework.cloud.alibaba.cloud.examples.dubbo.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");