mirror of
https://gitee.com/mirrors/Spring-Cloud-Alibaba.git
synced 2021-06-26 13:25:11 +08:00
以2.2.1.BUILD-SNAPSHOT 为基准,适配Greenwich版本的Spring Cloud
This commit is contained in:
@@ -17,6 +17,12 @@
|
||||
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
|
||||
|
@@ -23,9 +23,7 @@ import org.apache.dubbo.config.annotation.Reference;
|
||||
*/
|
||||
public class FooServiceConsumer {
|
||||
|
||||
@Reference(version = "${foo.service.version}",
|
||||
application = "${dubbo.application.id}",
|
||||
url = "dubbo://localhost:12345?version=1.0.0", timeout = 30000)
|
||||
@Reference(version = "${foo.service.version}", application = "${dubbo.application.id}", url = "dubbo://localhost:12345?version=1.0.0", timeout = 30000)
|
||||
private FooService fooService;
|
||||
|
||||
public String hello(String name) {
|
||||
|
@@ -17,6 +17,12 @@
|
||||
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
|
||||
@@ -42,7 +48,6 @@
|
||||
<groupId>org.apache.dubbo</groupId>
|
||||
<artifactId>dubbo</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
@@ -21,8 +21,7 @@ import org.apache.dubbo.config.annotation.Service;
|
||||
/**
|
||||
* @author fangjian
|
||||
*/
|
||||
@Service(version = "${foo.service.version}", application = "${dubbo.application.id}",
|
||||
protocol = "${dubbo.protocol.id}", registry = "${dubbo.registry.id}")
|
||||
@Service(version = "${foo.service.version}", application = "${dubbo.application.id}", protocol = "${dubbo.protocol.id}", registry = "${dubbo.registry.id}")
|
||||
public class FooServiceImpl implements FooService {
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user