camel git commit: [Spring Boot] Refactoring.
Repository: camel Updated Branches: refs/heads/master 75c62f2d2 - 084ab29a6 [Spring Boot] Refactoring. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/084ab29a Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/084ab29a Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/084ab29a Branch: refs/heads/master Commit: 084ab29a67bd5fd532dc95898604eef35ae7a9c8 Parents: 75c62f2 Author: Henryk Konsek hekon...@gmail.com Authored: Tue Jan 20 11:42:59 2015 +0100 Committer: Henryk Konsek hekon...@gmail.com Committed: Tue Jan 20 11:43:09 2015 +0100 -- .../spring/boot/CamelAutoConfiguration.java | 2 +- .../SpringConversionServiceConfiguration.java | 58 .../boot/TypeConversionConfiguration.java | 58 3 files changed, 59 insertions(+), 59 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/084ab29a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelAutoConfiguration.java -- diff --git a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelAutoConfiguration.java b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelAutoConfiguration.java index bb0bf6d..6bfbe39 100644 --- a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelAutoConfiguration.java +++ b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelAutoConfiguration.java @@ -30,7 +30,7 @@ import org.springframework.context.annotation.Import; @Configuration @EnableConfigurationProperties(CamelConfigurationProperties.class) -@Import(SpringConversionServiceConfiguration.class) +@Import(TypeConversionConfiguration.class) public class CamelAutoConfiguration { /** http://git-wip-us.apache.org/repos/asf/camel/blob/084ab29a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/SpringConversionServiceConfiguration.java -- diff --git a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/SpringConversionServiceConfiguration.java b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/SpringConversionServiceConfiguration.java deleted file mode 100644 index 1d5808a..000 --- a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/SpringConversionServiceConfiguration.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the License); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.camel.spring.boot; - -import static java.util.Arrays.asList; - -import org.apache.camel.CamelContext; -import org.apache.camel.TypeConverter; -import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; -import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; -import org.springframework.context.ApplicationContext; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.core.convert.ConversionService; -import org.springframework.core.convert.converter.Converter; -import org.springframework.core.convert.support.DefaultConversionService; - -@Configuration -@ConditionalOnProperty(value = camel.springboot.typeConversion, matchIfMissing = true) -public class SpringConversionServiceConfiguration { - -@Bean -TypeConverter typeConverter(CamelContext camelContext) { -return camelContext.getTypeConverter(); -} - -@ConditionalOnMissingBean -@Bean -ConversionService conversionService(ApplicationContext applicationContext) { -DefaultConversionService service = new DefaultConversionService(); -for (Converter converter : applicationContext.getBeansOfType(Converter.class).values()) { -service.addConverter(converter); -} -return service; -} - -@Bean -SpringTypeConverter springTypeConverter(CamelContext camelContext,
camel git commit: [Spring Boot] Refactoring.
Repository: camel Updated Branches: refs/heads/master 9c969b510 - 698fbd119 [Spring Boot] Refactoring. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/698fbd11 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/698fbd11 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/698fbd11 Branch: refs/heads/master Commit: 698fbd1196b9d9f4804b14be375fbc2ae8807db3 Parents: 9c969b5 Author: Henryk Konsek hekon...@gmail.com Authored: Mon Jan 5 19:16:41 2015 +0100 Committer: Henryk Konsek hekon...@gmail.com Committed: Mon Jan 5 19:16:41 2015 +0100 -- .../camel/spring/boot/CamelConfigurationProperties.java | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/698fbd11/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelConfigurationProperties.java -- diff --git a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelConfigurationProperties.java b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelConfigurationProperties.java index 0882c32..51bb2b0 100644 --- a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelConfigurationProperties.java +++ b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelConfigurationProperties.java @@ -21,6 +21,8 @@ import org.springframework.boot.context.properties.ConfigurationProperties; @ConfigurationProperties(prefix = camel.springboot) public class CamelConfigurationProperties { +// Properties + /** * Enable JMX support for the CamelContext. */ @@ -37,9 +39,11 @@ public class CamelConfigurationProperties { private int consumerTemplateCacheSize = 1000; /** - * + * Enables enhanced Camel/Spring type conversion. */ -private boolean typeConversion; +private boolean typeConversion = true; + +// Getters setters public boolean isJmxEnabled() { return jmxEnabled;
camel git commit: [Spring Boot] Refactoring.
Repository: camel Updated Branches: refs/heads/master d53e4000a - ac54279f2 [Spring Boot] Refactoring. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/ac54279f Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/ac54279f Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/ac54279f Branch: refs/heads/master Commit: ac54279f2e39c5cbcb8ba65f03fb2a804977cf02 Parents: d53e400 Author: Henryk Konsek hekon...@gmail.com Authored: Fri Jan 2 16:35:27 2015 +0100 Committer: Henryk Konsek hekon...@gmail.com Committed: Fri Jan 2 16:35:27 2015 +0100 -- .../spring/boot/CamelAutoConfiguration.java | 71 1 file changed, 71 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/ac54279f/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelAutoConfiguration.java -- diff --git a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelAutoConfiguration.java b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelAutoConfiguration.java index 3eb5f72..9b762d6 100644 --- a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelAutoConfiguration.java +++ b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelAutoConfiguration.java @@ -29,77 +29,6 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; -/** - * p - * Opinionated auto-configuration of the Camel context. Auto-detects Camel routes available in the Spring context and - * exposes the key Camel utilities (like producer template, consumer template and type converter). - * /p - * p - * The most important piece of functionality provided by the Camel starter is {@code CamelContext} instance. Camel starter - * will create {@code SpringCamelContext} for your and take care of the proper initialization and shutdown of that context. Created - * Camel context is also registered in the Spring application context (under {@code camelContext} name), so you can access it just - * as the any other Spring bean. - * - * pre - * {@literal @}Configuration - * public class MyAppConfig { - * - * {@literal @}Autowired - * CamelContext camelContext; - * - * {@literal @}Bean - * MyService myService() { - * return new DefaultMyService(camelContext); - * } - * - * } - * /pre - * - * /p - * p - * Camel starter collects all the `RoutesBuilder` instances from the Spring context and automatically injects - * them into the provided {@code CamelContext}. It means that creating new Camel route with the Spring Boot starter is as simple as - * adding the {@code @Component} annotated class into your classpath: - * /p - * - * p - * pre - * {@literal @}Component - * public class MyRouter extends RouteBuilder { - * - * {@literal @}Override - *public void configure() throws Exception { - * from(jms:invoices).to(file:/invoices); - * } - * - * } - * /pre - * /p - * - * p - * Or creating new route {@code RoutesBuilder} in your {@code @Configuration} class: - * /p - * p - * pre - * {@literal @}Configuration - * public class MyRouterConfiguration { - * - * {@literal @}Bean - * RoutesBuilder myRouter() { - * return new RouteBuilder() { - * - * {@literal @}Override - * public void configure() throws Exception { - * from(jms:invoices).to(file:/invoices); - * } - * - * }; - * } - * - * } - * /pre - * /p - */ @Configuration @EnableConfigurationProperties(CamelConfigurationProperties.class) @Import(SpringConversionServiceConfiguration.class)
camel git commit: [Spring Boot] Refactoring.
Repository: camel Updated Branches: refs/heads/master 578625d72 - 85778bc43 [Spring Boot] Refactoring. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/85778bc4 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/85778bc4 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/85778bc4 Branch: refs/heads/master Commit: 85778bc435247fd79add5116b6cab5067a6933d3 Parents: 578625d Author: Henryk Konsek hekon...@gmail.com Authored: Thu Jan 1 21:01:31 2015 +0100 Committer: Henryk Konsek hekon...@gmail.com Committed: Thu Jan 1 21:01:31 2015 +0100 -- .../java/org/apache/camel/spring/boot/CamelAutoConfiguration.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/85778bc4/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelAutoConfiguration.java -- diff --git a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelAutoConfiguration.java b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelAutoConfiguration.java index 4f24f7c..3eb5f72 100644 --- a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelAutoConfiguration.java +++ b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelAutoConfiguration.java @@ -125,7 +125,7 @@ public class CamelAutoConfiguration { } @Bean -RoutesCollector camelRoutesInjector() { +RoutesCollector routesCollector() { return new RoutesCollector(); }