You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Peter Hicks <pe...@poggs.co.uk> on 2022/11/29 13:41:32 UTC

Autowiring fails with Spring Boot 3

All,

I am running into a problem with camel-spring-boot-starter v3.18.x and
Spring Boot 3.  There is example code at
https://github.com/poggs/test-spring-boot-camel to show this.

When running under Spring Boot 2.7.x, the GenericRouteBuilder in my code is
able to get a CamelContext via constructor injection.  The same code under
Spring Boot 3.0.0 fails with the error "Parameter 0 of constructor in
uk.co.poggs.test.spring3.GenericRouteBuilder required a bean of type
'org.apache.camel.CamelContext' that could not be found".

Is Camel Spring Boot Starter supported running under Spring Boot 3?  Can
anyone guide me to fixing this supposedly autowiring problem that I've
spent my morning trying to debug?

I am fully prepared for it to be a simple case of a missing annotation, but
I just can't see it myself.


Peter

Re: Autowiring fails with Spring Boot 3

Posted by Andrea Cosentino <an...@gmail.com>.
Hello,

Camel Spring Boot 3.18.x is not supporting Spring Boot 3.

Camel 4 has the Spring Boot 3 support as target.

Il giorno mar 29 nov 2022 alle ore 14:42 Peter Hicks <
peter.hicks@poggs.co.uk> ha scritto:

> All,
>
> I am running into a problem with camel-spring-boot-starter v3.18.x and
> Spring Boot 3.  There is example code at
> https://github.com/poggs/test-spring-boot-camel to show this.
>
> When running under Spring Boot 2.7.x, the GenericRouteBuilder in my code is
> able to get a CamelContext via constructor injection.  The same code under
> Spring Boot 3.0.0 fails with the error "Parameter 0 of constructor in
> uk.co.poggs.test.spring3.GenericRouteBuilder required a bean of type
> 'org.apache.camel.CamelContext' that could not be found".
>
> Is Camel Spring Boot Starter supported running under Spring Boot 3?  Can
> anyone guide me to fixing this supposedly autowiring problem that I've
> spent my morning trying to debug?
>
> I am fully prepared for it to be a simple case of a missing annotation, but
> I just can't see it myself.
>
>
> Peter
>