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 2015/11/28 09:00:07 UTC
[4/4] camel git commit: Polished and added needed method after a
change in camel-spring-boot
Polished and added needed method after a change in camel-spring-boot
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/17e222db
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/17e222db
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/17e222db
Branch: refs/heads/master
Commit: 17e222db0912b7c119133c2be26875f546ec9f57
Parents: 51cf54f
Author: Claus Ibsen <da...@apache.org>
Authored: Sat Nov 28 08:56:28 2015 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Sat Nov 28 08:56:28 2015 +0100
----------------------------------------------------------------------
.../example/springboot/metrics/Application.java | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/17e222db/examples/camel-example-spring-boot-metrics/src/main/java/org/apache/camel/example/springboot/metrics/Application.java
----------------------------------------------------------------------
diff --git a/examples/camel-example-spring-boot-metrics/src/main/java/org/apache/camel/example/springboot/metrics/Application.java b/examples/camel-example-spring-boot-metrics/src/main/java/org/apache/camel/example/springboot/metrics/Application.java
index 9873a54..bbeb2fd 100644
--- a/examples/camel-example-spring-boot-metrics/src/main/java/org/apache/camel/example/springboot/metrics/Application.java
+++ b/examples/camel-example-spring-boot-metrics/src/main/java/org/apache/camel/example/springboot/metrics/Application.java
@@ -53,9 +53,8 @@ public class Application {
* @param args no command line args required
*/
public static void main(String[] args) {
- LOG.info(" *** STARTING CAMEL METRICS EXAMPLE APPLICATION ***");
+ LOG.info(" *** Starting Camel Metrics Example Application ***");
SpringApplication.run(Application.class, args);
-
}
/**
@@ -79,10 +78,9 @@ public class Application {
@Bean
public RouteBuilder slowRoute() {
return new RouteBuilder() {
-
@Override
public void configure() throws Exception {
- from("timer://foo?period=6000&daemon=false").routeId("slow-route").setBody().constant("Slow hello world!").log("${body}");
+ from("timer://foo?period=6000").routeId("slow-route").setBody().constant("Slow hello world!").log("${body}");
}
};
}
@@ -93,10 +91,9 @@ public class Application {
@Bean
public RouteBuilder fastRoute() {
return new RouteBuilder() {
-
@Override
public void configure() throws Exception {
- from("timer://foo?period=2000&daemon=false").routeId("fast-route").setBody().constant("Fast hello world!").log("${body}");
+ from("timer://foo?period=2000").routeId("fast-route").setBody().constant("Fast hello world!").log("${body}");
}
};
}
@@ -104,14 +101,18 @@ public class Application {
@Bean
CamelContextConfiguration contextConfiguration() {
return new CamelContextConfiguration() {
-
@Override
public void beforeApplicationStart(CamelContext context) {
- LOG.info("Configuring camel metrics on all routes");
+ LOG.info("Configuring Camel metrics on all routes");
MetricsRoutePolicyFactory fac = new MetricsRoutePolicyFactory();
fac.setMetricsRegistry(metricRegistry);
context.addRoutePolicyFactory(fac);
}
+
+ @Override
+ public void afterApplicationStart(CamelContext camelContext) {
+ // noop
+ }
};
}