You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by me...@apache.org on 2018/03/28 03:14:09 UTC
[incubator-dubbo-spring-boot-project] branch 0.2.0 updated: Polish
samples #67
This is an automated email from the ASF dual-hosted git repository.
mercyblitz pushed a commit to branch 0.2.0
in repository https://gitbox.apache.org/repos/asf/incubator-dubbo-spring-boot-project.git
The following commit(s) were added to refs/heads/0.2.0 by this push:
new 002743f Polish samples #67
002743f is described below
commit 002743f7de2dcc460f1847a454934ad99dcfeb05
Author: taogu.mxx <ta...@taobao.com>
AuthorDate: Wed Mar 28 11:13:20 2018 +0800
Polish samples #67
---
.../demo/consumer/controller/DemoConsumerController.java | 2 +-
.../src/main/resources/application.properties | 3 +++
.../dubbo/demo/provider/service/DefaultDemoService.java | 2 +-
.../src/main/resources/application.properties | 13 +++++++++++--
4 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/dubbo-spring-boot-samples/dubbo-spring-boot-sample-consumer/src/main/java/com/alibaba/boot/dubbo/demo/consumer/controller/DemoConsumerController.java b/dubbo-spring-boot-samples/dubbo-spring-boot-sample-consumer/src/main/java/com/alibaba/boot/dubbo/demo/consumer/controller/DemoConsumerController.java
index d410d90..5b105d6 100644
--- a/dubbo-spring-boot-samples/dubbo-spring-boot-sample-consumer/src/main/java/com/alibaba/boot/dubbo/demo/consumer/controller/DemoConsumerController.java
+++ b/dubbo-spring-boot-samples/dubbo-spring-boot-sample-consumer/src/main/java/com/alibaba/boot/dubbo/demo/consumer/controller/DemoConsumerController.java
@@ -31,7 +31,7 @@ import org.springframework.web.bind.annotation.RestController;
@RestController
public class DemoConsumerController {
- @Reference(version = "1.0.0",
+ @Reference(version = "${demo.service.version}",
application = "${dubbo.application.id}",
url = "dubbo://localhost:12345")
private DemoService demoService;
diff --git a/dubbo-spring-boot-samples/dubbo-spring-boot-sample-consumer/src/main/resources/application.properties b/dubbo-spring-boot-samples/dubbo-spring-boot-sample-consumer/src/main/resources/application.properties
index b794b88..df91988 100644
--- a/dubbo-spring-boot-samples/dubbo-spring-boot-sample-consumer/src/main/resources/application.properties
+++ b/dubbo-spring-boot-samples/dubbo-spring-boot-sample-consumer/src/main/resources/application.properties
@@ -3,6 +3,9 @@ spring.application.name = dubbo-consumer-demo
server.port = 8080
management.server.port = 8081
+# DemoService service version
+demo.service.version = 1.0.0
+
# Dubbo Config properties
## ApplicationConfig Bean
dubbo.application.id = dubbo-consumer-demo
diff --git a/dubbo-spring-boot-samples/dubbo-spring-boot-sample-provider/src/main/java/com/alibaba/boot/dubbo/demo/provider/service/DefaultDemoService.java b/dubbo-spring-boot-samples/dubbo-spring-boot-sample-provider/src/main/java/com/alibaba/boot/dubbo/demo/provider/service/DefaultDemoService.java
index 79a9626..48bfc22 100644
--- a/dubbo-spring-boot-samples/dubbo-spring-boot-sample-provider/src/main/java/com/alibaba/boot/dubbo/demo/provider/service/DefaultDemoService.java
+++ b/dubbo-spring-boot-samples/dubbo-spring-boot-sample-provider/src/main/java/com/alibaba/boot/dubbo/demo/provider/service/DefaultDemoService.java
@@ -27,7 +27,7 @@ import com.alibaba.dubbo.config.annotation.Service;
* @since 1.0.0
*/
@Service(
- version = "1.0.0",
+ version = "${demo.service.version}",
application = "${dubbo.application.id}",
protocol = "${dubbo.protocol.id}",
registry = "${dubbo.registry.id}"
diff --git a/dubbo-spring-boot-samples/dubbo-spring-boot-sample-provider/src/main/resources/application.properties b/dubbo-spring-boot-samples/dubbo-spring-boot-sample-provider/src/main/resources/application.properties
index 179eb87..876eedb 100644
--- a/dubbo-spring-boot-samples/dubbo-spring-boot-sample-provider/src/main/resources/application.properties
+++ b/dubbo-spring-boot-samples/dubbo-spring-boot-sample-provider/src/main/resources/application.properties
@@ -2,6 +2,10 @@
spring.application.name = dubbo-provider-demo
server.port = 9090
+
+# DemoService service version
+demo.service.version = 1.0.0
+
# Base packages to scan Dubbo Components (e.g @Service , @Reference)
dubbo.scan.basePackages = com.alibaba.boot.dubbo.demo.provider.service
@@ -23,8 +27,13 @@ dubbo.protocol.status = server
dubbo.registry.id = my-registry
dubbo.registry.address = N/A
-# Dubbo Endpoint (default status is disable)
-endpoints.dubbo.enabled = true
+# Enables Dubbo All Endpoints
+management.endpoint.dubbo.enabled = true
+management.endpoint.dubbo-shutdown.enabled = true
+management.endpoint.dubbo-configs.enabled = true
+management.endpoint.dubbo-services.enabled = true
+management.endpoint.dubbo-references.enabled = true
+management.endpoint.dubbo-properties.enabled = true
# Dubbo Health
## StatusChecker Name defaults (default : "memory", "load" )
--
To stop receiving notification emails like this one, please contact
mercyblitz@apache.org.