Description
It appears that reloading of route changes made in a project using spring-boot-devtools is no longer working with Camel 4 and Spring Boot 3. It was previously working with these versions:
<spring-boot.version>2.7.18</spring-boot.version>
<camel.version>3.22.1</camel.version>
But stops working with:
<spring-boot.version>3.0.2</spring-boot.version>
<camel.version>4.0.0-M1</camel.version>
and upwards
Tested with corretto-18 and corretto-21
I made a sample repo to reproduce the issue: https://github.com/rlratcliffe/openapi27-test. Separate commits for working vs not working. Instructions below. I recognize that this could be more of a Camel problem, but since it worked previously on the older versions of SB/devtools I thought I would try here first. Thank you for your time.
Clone the repo mentioned above and then:
Working with old versions:
git checkout 3fec6482c5042d6bc944771ab9ddd7dbd223c9a6
- In Intellij, Run CamelApplication.main()
- Once application is started, in a terminal
curl http://localhost:9000/api/hello
which should output "hola" - Edit RoutesImplementation line 21 to say
.setBody(simple("hello"))
- Build -> Build Project
Expected result: SB application restarts, Camel routes also restart and curl http://localhost:9000/api/hello
== "hello"
Actual result: same as expected result
- Stop application
Not working with new versions:
- Reset your changes to RoutesImplementation with
git restore .
or similar git checkout ab358fc7756bf8a7c3f341ada447cbc739e681c5
- In Intellij, Run CamelApplication.main()
- Once application is started, in a terminal
curl http://localhost:9000/api/hello
which should output "hola" - Edit RoutesImplementation line 21 to say
.setBody(simple("hello"))
- Build -> Build Project
Expected result: SB application restarts, Camel routes also restart and curl http://localhost:9000/api/hello
== "hello"
Actual result: Camel routes stop and curl http://localhost:9000/api/hello
== "Connection refused"