You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicecomb.apache.org by GitBox <gi...@apache.org> on 2018/03/15 08:32:38 UTC

[GitHub] WillemJiang closed pull request #599: [SCB-378] fix apllo readme

WillemJiang closed pull request #599: [SCB-378] fix apllo readme
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/599
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/samples/config-apollo-sample/README.md b/samples/config-apollo-sample/README.md
index 398b82676..0e96218a4 100644
--- a/samples/config-apollo-sample/README.md
+++ b/samples/config-apollo-sample/README.md
@@ -22,9 +22,9 @@ To use Apollo as configuration source in ServiceComb Java Chassis services:
   apollo:
     config:
       serverUri: http://127.0.0.1:8070	#Apollo portal server address
-      serviceName: apollo-test		#service name
-      env: DEV				#default valueDEV
-      clusters: test-cluster		#default value default
+      serviceName: apollo-test		#service name use AppId in apollo
+      env: DEV				#default value DEV
+      clusters: default		#default value default
       namespace: application		#default value application
       token: 				#get token from Apollo web pages
   ```
@@ -33,6 +33,21 @@ To use Apollo as configuration source in ServiceComb Java Chassis services:
 
   [Need to start service center first](http://servicecomb.incubator.apache.org/users/setup-environment/#)
 
+  Compile the source code at root directory of ServiceComb Java Chassis, which is `incubator-servicecomb-java-chassis/`, and use `mvn exec` to execute the main class `MainServer`.
+
+  ```bash
+  cd incubator-servicecomb-java-chassis/
+  mvn clean install -Psamples -DskipTests			#only need to install at first time.
+  cd samples/config-apollo-sample/
+  mvn exec:java -Dexec.mainClass="MainServer"
+  ```
+
+* Verify configurations can be configured dynamically.
+
+  Before publishing a new configuration items from apollo portal, `MainServer` will just print `DynamicProperty: {name=timeout, current value=default}` 
+
+  After `timeout` configuration is published with value `100`, `MainServer` will print `DynamicProperty: {name=timeout, current value=100}` 
+
 
 ## More
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services