Skip to content

Log4j2LoggingSystem pollutes Log4j2's environment with a SpringEnvironmentPropertySource that is never removed #40178

Closed
@rlratcliffe

Description

@rlratcliffe

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:

  1. git checkout 3fec6482c5042d6bc944771ab9ddd7dbd223c9a6
  2. In Intellij, Run CamelApplication.main()
  3. Once application is started, in a terminal curl http://localhost:9000/api/hello which should output "hola"
  4. Edit RoutesImplementation line 21 to say .setBody(simple("hello"))
  5. 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

  1. Stop application

Not working with new versions:

  1. Reset your changes to RoutesImplementation with git restore . or similar
  2. git checkout ab358fc7756bf8a7c3f341ada447cbc739e681c5
  3. In Intellij, Run CamelApplication.main()
  4. Once application is started, in a terminal curl http://localhost:9000/api/hello which should output "hola"
  5. Edit RoutesImplementation line 21 to say .setBody(simple("hello"))
  6. 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"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions