[ 
https://issues.apache.org/jira/browse/CAMEL-11756?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16159920#comment-16159920
 ] 

Claus Ibsen commented on CAMEL-11756:
-------------------------------------

First prototype of Camel running with spring boot 2
{code}
davsclaus:/Users/davsclaus/workspace/camel/examples/camel-example-spring-boot2 
(boot2)/$ mvn spring-boot:run
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Camel :: Example :: Spring Boot 2 2.20.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> spring-boot-maven-plugin:2.0.0.M3:run (default-cli) > test-compile @ 
camel-example-spring-boot2 >>>
[INFO]
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-maven) @ 
camel-example-spring-boot2 ---
[INFO]
[INFO] --- maven-bundle-plugin:3.3.0:cleanVersions (versions) @ 
camel-example-spring-boot2 ---
[INFO]
[INFO] --- maven-remote-resources-plugin:1.5:process (process-resource-bundles) 
@ camel-example-spring-boot2 ---
[INFO]
[INFO] --- maven-resources-plugin:3.0.2:resources (default-resources) @ 
camel-example-spring-boot2 ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-resources-plugin:3.0.2:resources (default) @ 
camel-example-spring-boot2 ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 3 resources
[INFO]
[INFO] --- camel-package-maven-plugin:2.20.0-SNAPSHOT:prepare-example (default) 
@ camel-example-spring-boot2 ---
[INFO]
[INFO] --- maven-compiler-plugin:3.6.1:compile (default-compile) @ 
camel-example-spring-boot2 ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:3.0.2:testResources (default-testResources) @ 
camel-example-spring-boot2 ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 
/Users/davsclaus/workspace/camel/examples/camel-example-spring-boot2/src/test/resources
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.6.1:testCompile (default-testCompile) @ 
camel-example-spring-boot2 ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] <<< spring-boot-maven-plugin:2.0.0.M3:run (default-cli) < test-compile @ 
camel-example-spring-boot2 <<<
[INFO]
[INFO]
[INFO] --- spring-boot-maven-plugin:2.0.0.M3:run (default-cli) @ 
camel-example-spring-boot2 ---

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::             (v2.0.0.M3)

2017-09-09 14:41:47.115  INFO 80762 --- [           main] 
sample.camel.SampleCamelApplication      : Starting SampleCamelApplication on 
davsclaus-pro.bbsyd.net with PID 80762 
(/Users/davsclaus/workspace/camel/examples/camel-example-spring-boot2/target/classes
 started by davsclaus in 
/Users/davsclaus/workspace/camel/examples/camel-example-spring-boot2)
2017-09-09 14:41:47.118  INFO 80762 --- [           main] 
sample.camel.SampleCamelApplication      : No active profile set, falling back 
to default profiles: default
2017-09-09 14:41:47.155  INFO 80762 --- [           main] 
ConfigServletWebServerApplicationContext : Refreshing 
org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@2ecc6221:
 startup date [Sat Sep 09 14:41:47 CEST 2017]; root of context hierarchy
2017-09-09 14:41:48.336  INFO 80762 --- [           main] 
trationDelegate$BeanPostProcessorChecker : Bean 
'org.apache.camel.spring.boot.CamelAutoConfiguration' of type [class 
org.apache.camel.spring.boot.CamelAutoConfiguration$$EnhancerBySpringCGLIB$$b12a1cf4]
 is not eligible for getting processed by all BeanPostProcessors (for example: 
not eligible for auto-proxying)
2017-09-09 14:41:48.521  INFO 80762 --- [           main] 
o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 
8080 (http)
2017-09-09 14:41:48.535  INFO 80762 --- [           main] 
o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2017-09-09 14:41:48.536  INFO 80762 --- [           main] 
org.apache.catalina.core.StandardEngine  : Starting Servlet Engine: Apache 
Tomcat/8.5.16
2017-09-09 14:41:48.606  INFO 80762 --- [ost-startStop-1] 
o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded 
WebApplicationContext
2017-09-09 14:41:48.606  INFO 80762 --- [ost-startStop-1] 
o.s.web.context.ContextLoader            : Root WebApplicationContext: 
initialization completed in 1454 ms
2017-09-09 14:41:48.657  INFO 80762 --- [ost-startStop-1] 
o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 
'characterEncodingFilter' to: [/*]
2017-09-09 14:41:49.153  INFO 80762 --- [           main] 
o.a.c.i.converter.DefaultTypeConverter   : Type converters loaded (core: 192, 
classpath: 1)
2017-09-09 14:41:49.845  INFO 80762 --- [           main] 
o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure 
on startup
2017-09-09 14:41:49.853  INFO 80762 --- [           main] 
o.s.c.support.DefaultLifecycleProcessor  : Starting beans in phase 0
2017-09-09 14:41:49.959  INFO 80762 --- [           main] 
o.a.camel.spring.boot.RoutesCollector    : Loading additional Camel XML routes 
from: classpath:camel/*.xml
2017-09-09 14:41:49.959  INFO 80762 --- [           main] 
o.a.camel.spring.boot.RoutesCollector    : Loading additional Camel XML rests 
from: classpath:camel-rest/*.xml
2017-09-09 14:41:49.971  INFO 80762 --- [           main] 
o.a.camel.spring.SpringCamelContext      : Apache Camel 2.20.0-SNAPSHOT 
(CamelContext: SampleCamel) is starting
2017-09-09 14:41:49.973  INFO 80762 --- [           main] 
o.a.c.m.ManagedManagementStrategy        : JMX is enabled
2017-09-09 14:41:50.134  INFO 80762 --- [           main] 
o.a.camel.spring.SpringCamelContext      : StreamCaching is not in use. If 
using streams then its recommended to enable stream caching. See more details 
at http://camel.apache.org/stream-caching.html
2017-09-09 14:41:50.172  INFO 80762 --- [           main] 
o.a.camel.spring.SpringCamelContext      : Route: route1 started and consuming 
from: timer://hello?period=2000
2017-09-09 14:41:50.173  INFO 80762 --- [           main] 
o.a.camel.spring.SpringCamelContext      : Total 1 routes, of which 1 are 
started
2017-09-09 14:41:50.174  INFO 80762 --- [           main] 
o.a.camel.spring.SpringCamelContext      : Apache Camel 2.20.0-SNAPSHOT 
(CamelContext: SampleCamel) started in 0.202 seconds
2017-09-09 14:41:50.222  INFO 80762 --- [           main] 
o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8080 
(http)
2017-09-09 14:41:50.227  INFO 80762 --- [           main] 
sample.camel.SampleCamelApplication      : Started SampleCamelApplication in 
3.404 seconds (JVM running for 9.817)
Hello World
Hello World
Hello World
^C2017-09-09 14:41:55.686  INFO 80762 --- [       Thread-4] 
ConfigServletWebServerApplicationContext : Closing 
org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@2ecc6221:
 startup date [Sat Sep 09 14:41:47 CEST 2017]; root of context hierarchy
2017-09-09 14:41:55.688  INFO 80762 --- [       Thread-4] 
o.s.c.support.DefaultLifecycleProcessor  : Stopping beans in phase 2147483647
2017-09-09 14:41:55.689  INFO 80762 --- [       Thread-4] 
o.a.camel.spring.SpringCamelContext      : Apache Camel 2.20.0-SNAPSHOT 
(CamelContext: SampleCamel) is shutting down
2017-09-09 14:41:55.689  INFO 80762 --- [       Thread-4] 
o.a.camel.impl.DefaultShutdownStrategy   : Starting to graceful shutdown 1 
routes (timeout 300 seconds)
2017-09-09 14:41:55.693  INFO 80762 --- [ - ShutdownTask] 
o.a.camel.impl.DefaultShutdownStrategy   : Route: route1 shutdown complete, was 
consuming from: timer://hello?period=2000
2017-09-09 14:41:55.693  INFO 80762 --- [       Thread-4] 
o.a.camel.impl.DefaultShutdownStrategy   : Graceful shutdown of 1 routes 
completed in 0 seconds
2017-09-09 14:41:55.708  INFO 80762 --- [       Thread-4] 
o.a.camel.spring.SpringCamelContext      : Apache Camel 2.20.0-SNAPSHOT 
(CamelContext: SampleCamel) uptime 5.737 seconds
2017-09-09 14:41:55.708  INFO 80762 --- [       Thread-4] 
o.a.camel.spring.SpringCamelContext      : Apache Camel 2.20.0-SNAPSHOT 
(CamelContext: SampleCamel) is shutdown in 0.019 seconds
2017-09-09 14:41:55.709  INFO 80762 --- [       Thread-4] 
o.s.c.support.DefaultLifecycleProcessor  : Stopping beans in phase 0
2017-09-09 14:41:55.710  INFO 80762 --- [       Thread-4] 
o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans on 
shutdown
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14.416 s
[INFO] Finished at: 2017-09-09T14:41:55+02:00
davsclaus:/Users/davsclaus/workspace/camel/examples/camel-example-spring-boot2 
(boot2)/$
{code}

The spring-boot POM and dependencies are a bit messed up, so I had to add a 
bunch of dependencies manually, and had to add spring 5, and reactor and some 
other stuff, and also undertow did not work so used tomcat, and some problems 
with webmvc etc. 


> camel-spring-boot2 - Create experimental spring boot 2 component
> ----------------------------------------------------------------
>
>                 Key: CAMEL-11756
>                 URL: https://issues.apache.org/jira/browse/CAMEL-11756
>             Project: Camel
>          Issue Type: Task
>          Components: camel-spring-boot
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.20.0
>
>
> We should try get started with the migration effort for getting Camel running 
> on Spring Boot 2.0.x.
> There may be issues with the starter component as Spring Boot guys changed 
> stuff how auto configuration and setting properties works. So we may need to 
> have some kind of interface in camel-spring-boot and camel-spring-boot2 where 
> we can have different implementation that the -starter can use.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to