-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Since 2.5.1, a circular reference is created when one SpringLiquibase bean is configured to depend on another #27131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@denis111 Can you provide a minimal sample that we can run to reproduce the issue? |
@mbhave sure, here's the sample project https://github.com/denis111/spring-boot-issue-27131 . It does nothing, it's very dumb but you can see that it executes fine with 2.5.0 and fails with 2.5.2. |
Thanks for the sample. I think it's the fix for #26692 that's causing this. We probably didn't consider the case where beans detected by the the |
@codergmc Because the second liqiubase needs tables created by first liquibase. The first one is like main application database tables that always needed and the second one is like optional module/plugin that can be on classpath or not. |
Hello,
I have two SpringLiquibase beans defined in different classes and modules in multi-module Gradle project, one of them depends on main liquibase bean. This code works perfect with v2.5.0 and below:
But starting with Spring Boot 2.5.1 I've got an exception on start-up:
I can't see how 'liquibase' bean can depend on 'oauth2SpringLiquibase', besides as I said before it works with Spring Boot 2.5.0 and below. Also I'm not sure if this applies to only SpringLiquibase beans or any other bean types.
I tried some workarounds without luck: If i remove DependsOn annotation then oauth2SpringLiquibase gets executed first, if I replace DependsOn by ConditionalOnBean oauth2SpringLiquibase gets never executed.
The text was updated successfully, but these errors were encountered: