Skip to content

spring.main.allow-bean-definition-overriding=true is ignored if not set in application.properties #15037

@DiabolusExMachina

Description

@DiabolusExMachina

Hello,
I'm facing a problem during the upgrade to spring boot 2.1.0

We have lots applications with a depdency to a module that is overwriting an existing spring bean. After the upgrade to spring-boot 2.1.0 the applications cannot start anymore because spring.main.allow-bean-definition-overriding=true has to be set.

So in order to fix this issue I added "spring.main.allow-bean-definition-overriding=true" to a property file inside the modul. The Property file is loaded by a Configuration class with @PropetySource annotation.
The @configuration Class is also inside the module.

But that did not work. The applications still fail to start with the same error. It only works if I add pring.main.allow-bean-definition-overriding=true to the application.properties of the application.

But this is not a good solution because we have to change all our applications and not a single module. I guess this is a Bug or?

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: invalidAn issue that we don't feel is valid

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions