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.git


The following commit(s) were added to refs/heads/master by this push:
     new 422e094  Polished
422e094 is described below

commit 422e094b04bb6395192b2f4cdcc7be9786fe7770
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Sat Mar 10 09:08:02 2018 +0100

    Polished
---
 .../main/resources/archetype-resources/readme.adoc  | 16 ++++++++--------
 .../src/main/resources/application.properties       |  9 ++++++++-
 examples/camel-example-spring-boot/readme.adoc      | 19 +++++++++++--------
 .../sample/camel/{SampleBean.java => MyBean.java}   |  2 +-
 ...amelApplication.java => MyCamelApplication.java} |  4 ++--
 .../{SampleCamelRouter.java => MyCamelRouter.java}  |  2 +-
 .../src/main/resources/application.properties       | 21 +++++++++++----------
 .../test/java/sample/camel/FooApplicationTest.java  |  3 +--
 ...icationTest.java => MyCamelApplicationTest.java} |  4 ++--
 9 files changed, 45 insertions(+), 35 deletions(-)

diff --git 
a/archetypes/camel-archetype-spring-boot/src/main/resources/archetype-resources/readme.adoc
 
b/archetypes/camel-archetype-spring-boot/src/main/resources/archetype-resources/readme.adoc
index 04347d3..310c8fb 100644
--- 
a/archetypes/camel-archetype-spring-boot/src/main/resources/archetype-resources/readme.adoc
+++ 
b/archetypes/camel-archetype-spring-boot/src/main/resources/archetype-resources/readme.adoc
@@ -1,27 +1,27 @@
-# Camel Example Spring Boot
+== Camel Example Spring Boot
 
 This example shows how to work with a simple Apache Camel application using 
Spring Boot.
 
 The example generates messages using timer trigger, writes them to standard 
output.
 
-## Camel routes
+=== Camel routes
 
-The Camel route is located in the `SampleCamelRouter` class. In this class the 
route
-starts from a timer, that triggers every 2nd second and calls a Spring Bean 
`SampleBean`
+The Camel route is located in the `MyCamelRouter` class. In this class the 
route
+starts from a timer, that triggers every 2nd second and calls a Spring Bean 
`MyBean`
 which returns a message, that is routed to a stream endpoint which writes to 
standard output.
 
-## Using Camel components
+=== Using Camel components
 
 Apache Camel provides 200+ components which you can use to integrate and route 
messages between many systems
 and data formats. To use any of these Camel components, add the component as a 
dependency to your project.
 
-## How to run
+=== How to run
 
 You can run this example using
 
     mvn spring-boot:run
 
-## To get info about the routes
+=== To get info about the routes
 
 To show a summary of all the routes
 
@@ -36,7 +36,7 @@ curl -XGET -s http://localhost:8080/camel/routes/{id}/info
 ----
 
 
-## More information
+=== More information
 
 You can find more information about Apache Camel at the website: 
http://camel.apache.org/
 
diff --git 
a/archetypes/camel-archetype-spring-boot/src/main/resources/archetype-resources/src/main/resources/application.properties
 
b/archetypes/camel-archetype-spring-boot/src/main/resources/archetype-resources/src/main/resources/application.properties
index e476d26..34397fc 100644
--- 
a/archetypes/camel-archetype-spring-boot/src/main/resources/archetype-resources/src/main/resources/application.properties
+++ 
b/archetypes/camel-archetype-spring-boot/src/main/resources/archetype-resources/src/main/resources/application.properties
@@ -24,6 +24,13 @@ greeting = Hello World
 # how often to trigger the timer
 timer.period = 2000
 
+# to automatic shutdown the JVM after a period of time
+#camel.springboot.duration-max-seconds=60
+#camel.springboot.duration-max-messages=100
+
+# add for example: &repeatCount=5 to the timer endpoint to make Camel idle
+#camel.springboot.duration-max-idle-seconds=15
+
 # all access to actuator endpoints without security
 management.security.enabled = false
 # turn on actuator health check
@@ -37,4 +44,4 @@ endpoints.camelroutes.read-only = true
 #logging.level.org.springframework = INFO
 #logging.level.org.apache.camel.spring.boot = INFO
 #logging.level.org.apache.camel.impl = DEBUG
-#logging.level.sample.camel = DEBUG
\ No newline at end of file
+#logging.level.sample.camel = DEBUG
diff --git a/examples/camel-example-spring-boot/readme.adoc 
b/examples/camel-example-spring-boot/readme.adoc
index 72475b2..310c8fb 100644
--- a/examples/camel-example-spring-boot/readme.adoc
+++ b/examples/camel-example-spring-boot/readme.adoc
@@ -1,27 +1,27 @@
-# Camel Example Spring Boot
+== Camel Example Spring Boot
 
 This example shows how to work with a simple Apache Camel application using 
Spring Boot.
 
 The example generates messages using timer trigger, writes them to standard 
output.
 
-## Camel routes
+=== Camel routes
 
-The Camel route is located in the `SampleCamelRouter` class. In this class the 
route
-starts from a timer, that triggers every 2nd second and calls a Spring Bean 
`SampleBean`
+The Camel route is located in the `MyCamelRouter` class. In this class the 
route
+starts from a timer, that triggers every 2nd second and calls a Spring Bean 
`MyBean`
 which returns a message, that is routed to a stream endpoint which writes to 
standard output.
 
-## Using Camel components
+=== Using Camel components
 
 Apache Camel provides 200+ components which you can use to integrate and route 
messages between many systems
 and data formats. To use any of these Camel components, add the component as a 
dependency to your project.
 
-## How to run
+=== How to run
 
 You can run this example using
 
     mvn spring-boot:run
 
-## To get info about the routes
+=== To get info about the routes
 
 To show a summary of all the routes
 
@@ -36,6 +36,9 @@ curl -XGET -s http://localhost:8080/camel/routes/{id}/info
 ----
 
 
-## More information
+=== More information
 
 You can find more information about Apache Camel at the website: 
http://camel.apache.org/
+
+
+
diff --git 
a/examples/camel-example-spring-boot/src/main/java/sample/camel/SampleBean.java 
b/examples/camel-example-spring-boot/src/main/java/sample/camel/MyBean.java
similarity index 98%
rename from 
examples/camel-example-spring-boot/src/main/java/sample/camel/SampleBean.java
rename to 
examples/camel-example-spring-boot/src/main/java/sample/camel/MyBean.java
index b60ef69..ca59354 100644
--- 
a/examples/camel-example-spring-boot/src/main/java/sample/camel/SampleBean.java
+++ b/examples/camel-example-spring-boot/src/main/java/sample/camel/MyBean.java
@@ -26,7 +26,7 @@ import org.springframework.stereotype.Component;
  * that we use in the Camel route to lookup this bean.
  */
 @Component("myBean")
-public class SampleBean {
+public class MyBean {
 
     @Value("${greeting}")
     private String say;
diff --git 
a/examples/camel-example-spring-boot/src/main/java/sample/camel/SampleCamelApplication.java
 
b/examples/camel-example-spring-boot/src/main/java/sample/camel/MyCamelApplication.java
similarity index 91%
rename from 
examples/camel-example-spring-boot/src/main/java/sample/camel/SampleCamelApplication.java
rename to 
examples/camel-example-spring-boot/src/main/java/sample/camel/MyCamelApplication.java
index 5d9304a..d99bb13 100644
--- 
a/examples/camel-example-spring-boot/src/main/java/sample/camel/SampleCamelApplication.java
+++ 
b/examples/camel-example-spring-boot/src/main/java/sample/camel/MyCamelApplication.java
@@ -24,13 +24,13 @@ import 
org.springframework.boot.autoconfigure.SpringBootApplication;
  * A sample Spring Boot application that starts the Camel routes.
  */
 @SpringBootApplication
-public class SampleCamelApplication {
+public class MyCamelApplication {
 
     /**
      * A main method to start this application.
      */
     public static void main(String[] args) {
-        SpringApplication.run(SampleCamelApplication.class, args);
+        SpringApplication.run(MyCamelApplication.class, args);
     }
 
 }
diff --git 
a/examples/camel-example-spring-boot/src/main/java/sample/camel/SampleCamelRouter.java
 
b/examples/camel-example-spring-boot/src/main/java/sample/camel/MyCamelRouter.java
similarity index 96%
rename from 
examples/camel-example-spring-boot/src/main/java/sample/camel/SampleCamelRouter.java
rename to 
examples/camel-example-spring-boot/src/main/java/sample/camel/MyCamelRouter.java
index 4b11938..5770e14 100644
--- 
a/examples/camel-example-spring-boot/src/main/java/sample/camel/SampleCamelRouter.java
+++ 
b/examples/camel-example-spring-boot/src/main/java/sample/camel/MyCamelRouter.java
@@ -25,7 +25,7 @@ import org.springframework.stereotype.Component;
  * Use <tt>@Component</tt> to make Camel auto detect this route when starting.
  */
 @Component
-public class SampleCamelRouter extends RouteBuilder {
+public class MyCamelRouter extends RouteBuilder {
 
     @Override
     public void configure() throws Exception {
diff --git 
a/examples/camel-example-spring-boot/src/main/resources/application.properties 
b/examples/camel-example-spring-boot/src/main/resources/application.properties
index 75a10de..34397fc 100644
--- 
a/examples/camel-example-spring-boot/src/main/resources/application.properties
+++ 
b/examples/camel-example-spring-boot/src/main/resources/application.properties
@@ -16,7 +16,13 @@
 ## ---------------------------------------------------------------------------
 
 # the name of Camel
-camel.springboot.name = SampleCamel
+camel.springboot.name = MyCamel
+
+# what to say
+greeting = Hello World
+
+# how often to trigger the timer
+timer.period = 2000
 
 # to automatic shutdown the JVM after a period of time
 #camel.springboot.duration-max-seconds=60
@@ -25,20 +31,15 @@ camel.springboot.name = SampleCamel
 # add for example: &repeatCount=5 to the timer endpoint to make Camel idle
 #camel.springboot.duration-max-idle-seconds=15
 
-# properties used in the Camel route and beans
-# --------------------------------------------
-
-# what to say
-greeting = Hello World
-
-# how often to trigger the timer
-timer.period = 2000
-
 # all access to actuator endpoints without security
 management.security.enabled = false
 # turn on actuator health check
 endpoints.health.enabled = true
 
+# allow to obtain basic information about camel routes (read only mode)
+endpoints.camelroutes.enabled = true
+endpoints.camelroutes.read-only = true
+
 # to configure logging levels
 #logging.level.org.springframework = INFO
 #logging.level.org.apache.camel.spring.boot = INFO
diff --git 
a/examples/camel-example-spring-boot/src/test/java/sample/camel/FooApplicationTest.java
 
b/examples/camel-example-spring-boot/src/test/java/sample/camel/FooApplicationTest.java
index 45f2076..721e8cb 100644
--- 
a/examples/camel-example-spring-boot/src/test/java/sample/camel/FooApplicationTest.java
+++ 
b/examples/camel-example-spring-boot/src/test/java/sample/camel/FooApplicationTest.java
@@ -22,7 +22,6 @@ import org.apache.camel.CamelContext;
 import org.apache.camel.builder.NotifyBuilder;
 import org.apache.camel.test.spring.CamelSpringBootRunner;
 import org.apache.camel.test.spring.EnableRouteCoverage;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -31,7 +30,7 @@ import org.springframework.boot.test.context.SpringBootTest;
 import static org.junit.Assert.assertTrue;
 
 @RunWith(CamelSpringBootRunner.class)
-@SpringBootTest(classes = SampleCamelApplication.class,
+@SpringBootTest(classes = MyCamelApplication.class,
     properties = "greeting = Hello foo")
 @EnableRouteCoverage
 //@Ignore // enable me to run this test as well so we can cover testing the 
route completely
diff --git 
a/examples/camel-example-spring-boot/src/test/java/sample/camel/SampleCamelApplicationTest.java
 
b/examples/camel-example-spring-boot/src/test/java/sample/camel/MyCamelApplicationTest.java
similarity index 94%
rename from 
examples/camel-example-spring-boot/src/test/java/sample/camel/SampleCamelApplicationTest.java
rename to 
examples/camel-example-spring-boot/src/test/java/sample/camel/MyCamelApplicationTest.java
index f4c2fc5..de0b3fd 100644
--- 
a/examples/camel-example-spring-boot/src/test/java/sample/camel/SampleCamelApplicationTest.java
+++ 
b/examples/camel-example-spring-boot/src/test/java/sample/camel/MyCamelApplicationTest.java
@@ -30,9 +30,9 @@ import org.springframework.boot.test.context.SpringBootTest;
 import static org.junit.Assert.assertTrue;
 
 @RunWith(CamelSpringBootRunner.class)
-@SpringBootTest(classes = SampleCamelApplication.class)
+@SpringBootTest(classes = MyCamelApplication.class)
 @EnableRouteCoverage
-public class SampleCamelApplicationTest {
+public class MyCamelApplicationTest {
 
     @Autowired
     private CamelContext camelContext;

-- 
To stop receiving notification emails like this one, please contact
davscl...@apache.org.

Reply via email to