Skip to content

LiquibaseEntityManagerFactoryDependsOnPostProcessor is not called since spring-boot 2.2.0 #18666

@kflorian

Description

@kflorian

Since upgrading to spring-boot 2.2.0 (from 2.1.9), our Liquibase changelogs are no longer deployed before the Hibernate container starts.

My investigation indicates that the LiquibaseEntityManagerFactoryDependsOnPostProcessor is no longer called with spring-boot 2.2.0, causing the dependency from entityManagerFactory to liquibase to be missing.

I suspect that the cause is commit 795303d:

It replaced the @configuration annotation on the post-processor by an @import annotation on the LiquibaseConfiguration. However, there is also a @ConditionalOnMissingBean(SpringLiquibase.class) annotation on that bean, and since we are providing our own SpringLiquibase bean definition, I suspect that the entire configuration including the import is skipped.

If this is intended behaviour, then it would at least be nice to include this breaking change in the release notes.
Preferably, the LiquibaseEntityManagerFactoryDependsOnPostProcessor should still be triggered, even if the application provides it's own SpringLiquibase bean definition.

Thanks!

Best regards,
Florian Kirchmeir

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: supersededAn issue that has been superseded by anothertype: regressionA regression from a previous release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions