You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2020/03/16 12:15:00 UTC

[camel-spring-boot] 01/02: CAMEL-14575: camel-core - TypeConverter from String to Long - drop time pattern

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git

commit 4b5be8f58085eeb37e894b46322526c0493d7791
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Mar 16 13:14:34 2020 +0100

    CAMEL-14575: camel-core - TypeConverter from String to Long - drop time pattern
---
 .../org/apache/camel/examples/cluster/ClusterNodeConfiguration.java | 4 ++--
 .../cluster-node/src/main/resources/application.properties          | 2 +-
 .../src/main/java/sample/camel/ApplicationConfiguration.java        | 6 +++---
 .../application/src/main/resources/application.properties           | 4 ++--
 .../org/apache/camel/examples/master/MasterNodeConfiguration.java   | 4 ++--
 .../client/src/main/java/sample/camel/ClientRoute.java              | 2 +-
 .../src/main/java/sample/camel/NumberRoute.java                     | 2 +-
 .../org/apache/camel/example/spring/boot/rest/jpa/Application.java  | 4 ++--
 .../src/main/resources/application-dev.yml                          | 4 ++--
 .../src/main/resources/application.yml                              | 4 ++--
 .../apache/camel/example/spring/boot/rest/jpa/ApplicationTest.java  | 2 +-
 .../src/test/resources/application.yml                              | 4 ++--
 .../src/main/java/sample/camel/ApplicationRoutes.java               | 4 ++--
 .../src/main/resources/application.properties                       | 6 +++---
 .../client/src/main/java/sample/camel/ClientRoute.java              | 2 +-
 15 files changed, 27 insertions(+), 27 deletions(-)

diff --git a/examples/camel-example-spring-boot-clustered-route-controller/cluster-node/src/main/java/org/apache/camel/examples/cluster/ClusterNodeConfiguration.java b/examples/camel-example-spring-boot-clustered-route-controller/cluster-node/src/main/java/org/apache/camel/examples/cluster/ClusterNodeConfiguration.java
index b5b09dc..edc9b97 100644
--- a/examples/camel-example-spring-boot-clustered-route-controller/cluster-node/src/main/java/org/apache/camel/examples/cluster/ClusterNodeConfiguration.java
+++ b/examples/camel-example-spring-boot-clustered-route-controller/cluster-node/src/main/java/org/apache/camel/examples/cluster/ClusterNodeConfiguration.java
@@ -31,13 +31,13 @@ public class ClusterNodeConfiguration {
                 // This route is configured to be local (see application.properties)
                 // so it will be started regardless of the leadership status if
                 // this node.
-                from("timer:heartbeat?period=10s")
+                from("timer:heartbeat?period=10000")
                     .routeId("heartbeat")
                     .log("HeartBeat route (timer) {{node.id}} ...");
 
                 // This route is configured to be clustered so it will be started
                 // by the controller only when this node is leader
-                from("timer:clustered?period=5s")
+                from("timer:clustered?period=5000")
                     .routeId("clustered")
                     .log("Clustered route (timer) {{node.id}} ...");
             }
diff --git a/examples/camel-example-spring-boot-clustered-route-controller/cluster-node/src/main/resources/application.properties b/examples/camel-example-spring-boot-clustered-route-controller/cluster-node/src/main/resources/application.properties
index fbaf9c1..9bdcc4d 100644
--- a/examples/camel-example-spring-boot-clustered-route-controller/cluster-node/src/main/resources/application.properties
+++ b/examples/camel-example-spring-boot-clustered-route-controller/cluster-node/src/main/resources/application.properties
@@ -37,7 +37,7 @@ camel.springboot.jmx-enabled = false
 
 camel.clustered.controller.enabled = true
 camel.clustered.controller.namespace = camel
-camel.clustered.controller.initial-delay = 5s
+camel.clustered.controller.initial-delay = 5000
 
 camel.clustered.controller.routes.heartbeat.clustered = false
 
diff --git a/examples/camel-example-spring-boot-health-checks/application/src/main/java/sample/camel/ApplicationConfiguration.java b/examples/camel-example-spring-boot-health-checks/application/src/main/java/sample/camel/ApplicationConfiguration.java
index ed1eb0d..5131af9 100644
--- a/examples/camel-example-spring-boot-health-checks/application/src/main/java/sample/camel/ApplicationConfiguration.java
+++ b/examples/camel-example-spring-boot-health-checks/application/src/main/java/sample/camel/ApplicationConfiguration.java
@@ -27,17 +27,17 @@ public class ApplicationConfiguration {
     public RouteBuilder routesBuilder() {
         return new RouteBuilder() {
             public void configure() throws Exception {
-                from("timer:foo?period=1s")
+                from("timer:foo?period=1000")
                     .routeId("foo")
                     .process(e -> {
                         throw new RuntimeCamelException("This is a forced exception to have health check monitor this failure (route=foo)"); 
                     });
-                from("timer:bar?period=1s")
+                from("timer:bar?period=1000")
                     .routeId("bar")
                     .process(e -> {
                         throw new RuntimeCamelException("This is a forced exception to have health check monitor this failure (route=bar)");
                     });
-                from("timer:slow?period=1s")
+                from("timer:slow?period=1000")
                     .routeId("slow")
                     .process(e -> {
                         Thread.sleep(1200);
diff --git a/examples/camel-example-spring-boot-health-checks/application/src/main/resources/application.properties b/examples/camel-example-spring-boot-health-checks/application/src/main/resources/application.properties
index e22e0d2b..15d0eb8 100644
--- a/examples/camel-example-spring-boot-health-checks/application/src/main/resources/application.properties
+++ b/examples/camel-example-spring-boot-health-checks/application/src/main/resources/application.properties
@@ -47,7 +47,7 @@ camel.health.check.routes.enabled = true
 camel.health.check.routes.thresholds.exchanges-failed = 10
 camel.health.check.routes.threshold[bar].exchanges-failed = 20
 camel.health.check.routes.threshold[slow].inherit = false
-camel.health.check.routes.threshold[slow].last-processing-time.threshold = 1s
+camel.health.check.routes.threshold[slow].last-processing-time.threshold = 1000
 camel.health.check.routes.threshold[slow].last-processing-time.failures = 5
 
 # HealthChecks can be pulled out from SpringBoot's health endpoint using either
@@ -63,7 +63,7 @@ camel.health.check.routes.threshold[slow].last-processing-time.failures = 5
 # reached or the invocation is forced.
 #
 #camel.health.check.service.enabled = true
-#camel.health.check.service.check-interval = 10s
+#camel.health.check.service.check-interval = 10000
 
 ################################################################################
 #
diff --git a/examples/camel-example-spring-boot-master/src/main/java/org/apache/camel/examples/master/MasterNodeConfiguration.java b/examples/camel-example-spring-boot-master/src/main/java/org/apache/camel/examples/master/MasterNodeConfiguration.java
index 007f8c5..8746a4d8 100644
--- a/examples/camel-example-spring-boot-master/src/main/java/org/apache/camel/examples/master/MasterNodeConfiguration.java
+++ b/examples/camel-example-spring-boot-master/src/main/java/org/apache/camel/examples/master/MasterNodeConfiguration.java
@@ -31,13 +31,13 @@ public class MasterNodeConfiguration {
                 // This route is configured to be local (see application.properties)
                 // so it will be started regardless of the leadership status if
                 // this node.
-                from("timer:heartbeat?period=10s")
+                from("timer:heartbeat?period=10000")
                     .routeId("heartbeat")
                     .log("HeartBeat route (timer) {{node.id}} ...");
 
                 // This route is configured to be clustered so it will be started
                 // by the controller only when this node is leader
-                from("master:{{node.namespace}}:timer:clustered?period=5s")
+                from("master:{{node.namespace}}:timer:clustered?period=5000")
                     .routeId("clustered")
                     .log("Clustered route (timer) {{node.id}} ...");
             }
diff --git a/examples/camel-example-spring-boot-opentracing/client/src/main/java/sample/camel/ClientRoute.java b/examples/camel-example-spring-boot-opentracing/client/src/main/java/sample/camel/ClientRoute.java
index 4e392f2..0c43bdf 100644
--- a/examples/camel-example-spring-boot-opentracing/client/src/main/java/sample/camel/ClientRoute.java
+++ b/examples/camel-example-spring-boot-opentracing/client/src/main/java/sample/camel/ClientRoute.java
@@ -26,7 +26,7 @@ public class ClientRoute extends RouteBuilder {
     @Override
     public void configure() {
         // you can configure the route rule with Java DSL here
-        from("timer:trigger?exchangePattern=InOut&period=30s").streamCaching()
+        from("timer:trigger?exchangePattern=InOut&period=30000").streamCaching()
             .bean("counterBean")
             .log(" Client request: ${body}")
             .to("http://localhost:9090/service1")
diff --git a/examples/camel-example-spring-boot-pojo/src/main/java/sample/camel/NumberRoute.java b/examples/camel-example-spring-boot-pojo/src/main/java/sample/camel/NumberRoute.java
index 1d41754..a213538 100644
--- a/examples/camel-example-spring-boot-pojo/src/main/java/sample/camel/NumberRoute.java
+++ b/examples/camel-example-spring-boot-pojo/src/main/java/sample/camel/NumberRoute.java
@@ -26,7 +26,7 @@ public class NumberRoute extends RouteBuilder {
     public void configure() throws Exception {
         // generate random number every second
         // which is send to this seda queue that the NumberPojo will consume
-        from("timer:number?period=1s")
+        from("timer:number?period=1000")
             .transform().simple("${random(0,200)}")
             .to("direct:numbers");
     }
diff --git a/examples/camel-example-spring-boot-rest-jpa/src/main/java/org/apache/camel/example/spring/boot/rest/jpa/Application.java b/examples/camel-example-spring-boot-rest-jpa/src/main/java/org/apache/camel/example/spring/boot/rest/jpa/Application.java
index a038353..ad74c08 100644
--- a/examples/camel-example-spring-boot-rest-jpa/src/main/java/org/apache/camel/example/spring/boot/rest/jpa/Application.java
+++ b/examples/camel-example-spring-boot-rest-jpa/src/main/java/org/apache/camel/example/spring/boot/rest/jpa/Application.java
@@ -66,7 +66,7 @@ public class Application extends SpringBootServletInitializer {
         @Override
         public void configure() {
             // A first route generates some orders and queue them in DB
-            from("timer:new-order?delay=1s&period={{example.generateOrderPeriod:2s}}")
+            from("timer:new-order?delay=1000&period={{example.generateOrderPeriod:2000}}")
                 .routeId("generate-order")
                 .bean("orderService", "generateOrder")
                 .to("jpa:org.apache.camel.example.spring.boot.rest.jpa.Order")
@@ -75,7 +75,7 @@ public class Application extends SpringBootServletInitializer {
             // A second route polls the DB for new orders and processes them
             from("jpa:org.apache.camel.example.spring.boot.rest.jpa.Order"
                 + "?namedQuery=new-orders"
-                + "&delay={{example.processOrderPeriod:5s}}"
+                + "&delay={{example.processOrderPeriod:5000}}"
                 + "&consumeDelete=false")
                 .routeId("process-order")
                 .log("Processed order #id ${body.id} with ${body.amount} copies of the «${body.book.description}» book");
diff --git a/examples/camel-example-spring-boot-rest-jpa/src/main/resources/application-dev.yml b/examples/camel-example-spring-boot-rest-jpa/src/main/resources/application-dev.yml
index efbbbd9..de09a57 100644
--- a/examples/camel-example-spring-boot-rest-jpa/src/main/resources/application-dev.yml
+++ b/examples/camel-example-spring-boot-rest-jpa/src/main/resources/application-dev.yml
@@ -33,5 +33,5 @@ spring:
 
 # The application configuration properties
 example:
-  generateOrderPeriod: 2s
-  processOrderPeriod: 5s
+  generateOrderPeriod: 2000
+  processOrderPeriod: 5000
diff --git a/examples/camel-example-spring-boot-rest-jpa/src/main/resources/application.yml b/examples/camel-example-spring-boot-rest-jpa/src/main/resources/application.yml
index b462018..91f83c2 100644
--- a/examples/camel-example-spring-boot-rest-jpa/src/main/resources/application.yml
+++ b/examples/camel-example-spring-boot-rest-jpa/src/main/resources/application.yml
@@ -53,5 +53,5 @@ spring:
 
 # The application configuration properties
 example:
-  generateOrderPeriod: 10s
-  processOrderPeriod: 30s
+  generateOrderPeriod: 10000
+  processOrderPeriod: 30000
diff --git a/examples/camel-example-spring-boot-rest-jpa/src/test/java/org/apache/camel/example/spring/boot/rest/jpa/ApplicationTest.java b/examples/camel-example-spring-boot-rest-jpa/src/test/java/org/apache/camel/example/spring/boot/rest/jpa/ApplicationTest.java
index bb9b1dc..e5be00f 100644
--- a/examples/camel-example-spring-boot-rest-jpa/src/test/java/org/apache/camel/example/spring/boot/rest/jpa/ApplicationTest.java
+++ b/examples/camel-example-spring-boot-rest-jpa/src/test/java/org/apache/camel/example/spring/boot/rest/jpa/ApplicationTest.java
@@ -47,7 +47,7 @@ public class ApplicationTest {
 
     @Test
     public void newOrderTest() {
-        // Wait for maximum 5s until the first order gets inserted and processed
+        // Wait for maximum 5 seconds until the first order gets inserted and processed
         NotifyBuilder notify = new NotifyBuilder(camelContext)
             .fromRoute("generate-order")
             .whenDone(1)
diff --git a/examples/camel-example-spring-boot-rest-jpa/src/test/resources/application.yml b/examples/camel-example-spring-boot-rest-jpa/src/test/resources/application.yml
index 8b8eeae..acfe10e 100644
--- a/examples/camel-example-spring-boot-rest-jpa/src/test/resources/application.yml
+++ b/examples/camel-example-spring-boot-rest-jpa/src/test/resources/application.yml
@@ -25,5 +25,5 @@ camel:
         contextPath: /camel-rest-jpa/*
 
 example:
-  generateOrderPeriod: 1s
-  processOrderPeriod: 3s
+  generateOrderPeriod: 1000
+  processOrderPeriod: 3000
diff --git a/examples/camel-example-spring-boot-supervising-route-controller/src/main/java/sample/camel/ApplicationRoutes.java b/examples/camel-example-spring-boot-supervising-route-controller/src/main/java/sample/camel/ApplicationRoutes.java
index a120a5b..169b8a6 100644
--- a/examples/camel-example-spring-boot-supervising-route-controller/src/main/java/sample/camel/ApplicationRoutes.java
+++ b/examples/camel-example-spring-boot-supervising-route-controller/src/main/java/sample/camel/ApplicationRoutes.java
@@ -26,12 +26,12 @@ import org.springframework.stereotype.Component;
 public class ApplicationRoutes extends RouteBuilder {
     @Override
     public void configure() throws Exception {
-        from("timer:foo?period=5s")
+        from("timer:foo?period=5000")
             .id("foo")
             .startupOrder(2)
             .log("From timer (foo) ...");
 
-        from("timer:bar?period=5s")
+        from("timer:bar?period=5000")
             .id("bar")
             .startupOrder(1)
             .log("From timer (bar) ...");
diff --git a/examples/camel-example-spring-boot-supervising-route-controller/src/main/resources/application.properties b/examples/camel-example-spring-boot-supervising-route-controller/src/main/resources/application.properties
index 183e484..d8ac2c6 100644
--- a/examples/camel-example-spring-boot-supervising-route-controller/src/main/resources/application.properties
+++ b/examples/camel-example-spring-boot-supervising-route-controller/src/main/resources/application.properties
@@ -38,8 +38,8 @@ management.endpoint.camelroutes.read-only = false
 camel.springboot.name = SampleSupervisingRouteController
 
 camel.supervising.controller.enabled = true
-camel.supervising.controller.initial-delay = 5s
-camel.supervising.controller.default-back-off.delay = 5s
+camel.supervising.controller.initial-delay = 5000
+camel.supervising.controller.default-back-off.delay = 5000
 camel.supervising.controller.default-back-off.max-attempts = 10
-camel.supervising.controller.routes.undertow.back-off.delay = 10s
+camel.supervising.controller.routes.undertow.back-off.delay = 10000
 camel.supervising.controller.routes.undertow.back-off.max-attempts = 3
diff --git a/examples/camel-example-spring-boot-zipkin/client/src/main/java/sample/camel/ClientRoute.java b/examples/camel-example-spring-boot-zipkin/client/src/main/java/sample/camel/ClientRoute.java
index 4e392f2..0c43bdf 100644
--- a/examples/camel-example-spring-boot-zipkin/client/src/main/java/sample/camel/ClientRoute.java
+++ b/examples/camel-example-spring-boot-zipkin/client/src/main/java/sample/camel/ClientRoute.java
@@ -26,7 +26,7 @@ public class ClientRoute extends RouteBuilder {
     @Override
     public void configure() {
         // you can configure the route rule with Java DSL here
-        from("timer:trigger?exchangePattern=InOut&period=30s").streamCaching()
+        from("timer:trigger?exchangePattern=InOut&period=30000").streamCaching()
             .bean("counterBean")
             .log(" Client request: ${body}")
             .to("http://localhost:9090/service1")