You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by lb...@apache.org on 2018/05/30 10:05:03 UTC
[camel] 11/20: CAMEL-12531: camel cloud : create a spring cloud
based camel-service example
This is an automated email from the ASF dual-hosted git repository.
lburgazzoli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
commit d45a5df0071f9f91f073a18a28045634ade6d09d
Author: lburgazzoli <lb...@gmail.com>
AuthorDate: Wed May 23 20:25:12 2018 +0200
CAMEL-12531: camel cloud : create a spring cloud based camel-service example
---
.../consumer/src/main/resources/application.properties | 5 +++--
.../main/java/org/apache/camel/example/ServiceApplication.java | 7 ++-----
.../service/src/main/resources/application.properties | 8 +++++++-
3 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/examples/camel-example-spring-cloud-serviceregistry/consumer/src/main/resources/application.properties b/examples/camel-example-spring-cloud-serviceregistry/consumer/src/main/resources/application.properties
index 6f6ca73..0eaa50e 100644
--- a/examples/camel-example-spring-cloud-serviceregistry/consumer/src/main/resources/application.properties
+++ b/examples/camel-example-spring-cloud-serviceregistry/consumer/src/main/resources/application.properties
@@ -15,6 +15,8 @@
## limitations under the License.
## ---------------------------------------------------------------------------
+# Logging
+logging.level.org.apache.camel.spring.cloud = DEBUG
# Spring Boot
management.endpoints.enabled-by-default=false
@@ -36,8 +38,7 @@ camel.springboot.jmx-enabled=false
camel.rest.component = servlet
camel.rest.binding-mode = auto
-
-
+# Camel Service Call
camel.cloud.service-call.component = undertow
# this should not be needed but there is a bug or misbehavior
diff --git a/examples/camel-example-spring-cloud-serviceregistry/service/src/main/java/org/apache/camel/example/ServiceApplication.java b/examples/camel-example-spring-cloud-serviceregistry/service/src/main/java/org/apache/camel/example/ServiceApplication.java
index 869f46d..84d7b1d 100644
--- a/examples/camel-example-spring-cloud-serviceregistry/service/src/main/java/org/apache/camel/example/ServiceApplication.java
+++ b/examples/camel-example-spring-cloud-serviceregistry/service/src/main/java/org/apache/camel/example/ServiceApplication.java
@@ -32,12 +32,9 @@ public class ServiceApplication {
@Component
public class Services extends RouteBuilder {
public void configure() throws Exception {
- // TODO: service.host should be set using properties
- fromF("service:my-service:undertow:http://localhost:%d/path/to/service/1?service.host=localhost", SocketUtils.findAvailableTcpPort())
+ fromF("service:my-service:undertow:http://localhost:%d/path/to/service/1", SocketUtils.findAvailableTcpPort())
.transform().simple("Hi!, I'm service-1 on path: /path/to/service/1");
-
- // TODO: service.host should be set using properties
- fromF("service:my-service:undertow:http://localhost:%d/path/to/service/2?service.host=localhost", SocketUtils.findAvailableTcpPort())
+ fromF("service:my-service:undertow:http://localhost:%d/path/to/service/2", SocketUtils.findAvailableTcpPort())
.transform().simple("Hi!, I'm service-1 on path: /path/to/service/2");
}
}
diff --git a/examples/camel-example-spring-cloud-serviceregistry/service/src/main/resources/application.properties b/examples/camel-example-spring-cloud-serviceregistry/service/src/main/resources/application.properties
index 8ea1736..db451b5 100644
--- a/examples/camel-example-spring-cloud-serviceregistry/service/src/main/resources/application.properties
+++ b/examples/camel-example-spring-cloud-serviceregistry/service/src/main/resources/application.properties
@@ -15,6 +15,9 @@
## limitations under the License.
## ---------------------------------------------------------------------------
+# Logging
+logging.level.org.apache.camel.spring.cloud = DEBUG
+
# Spring Boot
management.endpoints.enabled-by-default = false
management.endpoint.health.enabled = true
@@ -29,4 +32,7 @@ spring.cloud.service-registry.auto-registration.enabled = false
# Camel
camel.springboot.main-run-controller = true
-camel.springboot.jmx-enabled = false
\ No newline at end of file
+camel.springboot.jmx-enabled = false
+
+# Camel Cloud
+camel.cloud.service-registry.service-host = localhost
\ No newline at end of file
--
To stop receiving notification emails like this one, please contact
lburgazzoli@apache.org.