-
Notifications
You must be signed in to change notification settings - Fork 40.5k
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
Dependency relationships created by AbstractDependsOnBeanFactoryPostProcessors cannot be overridden #18362
Comments
Thanks for the report and sorry for the inconvenience. This is an unanticipated side-effect of the fix for #18105. We can't roll back that change without reinstating the problem that it addresses so I'm not yet sure what we should do. Ordering permitting, you may be able to work around the problem by using a |
@jwenting I can reproduce the failure you have described with Spring Boot 2.1.8, but I cannot get it to work with 2.1.7. With 2.1.7 I see the failure that was fixed by #18105:
Can you please provide, as a zip attached to this issue, a minimal sample that fails with 2.1.8 but works with 2.1.7? |
Will see what I can do. It's part of a pretty large system I inherited earlier this year, who knows what all the interdepencies are under the hood... |
The demo project will fail while running Flyway under 2.1.7, while trying to create the Flyway bean under 2.1.8 |
Thanks. I can see that you have met 2.1.7's need for a bean named With that said, we'll see what we can do to allow you to continue with something similar to your current approach. Even if we're able to do something, you may want to consider reworking the way that you're using Flyway and Boot's auto-configuration of it. For example, providing your own |
We'll add an order to our |
From the commit messages in that piece of code I guess that they added the noop FlywayMigrationInitializer to force the loading of some application configuration settings from the database before the Flyway migration starts running. I inherited this code that was created several years ago by people who're since gone on to other projects and/or left the company. |
When upgrading to Spring Boot 2.1.8-RELEASE from 2.1.7-RELEASE we now get a
BeanCreationException
that didn't happen before (no code was changed, only the Spring Boot version number in the pom file).The bean definitions (in separate
@Configuration
annotated classes) are as follows:Again, in Spring Boot 2.1.7 (and earlier, this code was originally written against Spring Boot 1.3 and has been working in production for several years) this works as expected, the
delayedFlywayInitializer
gets created after thebaseEntityManager
(in order to run Flyway migrations after Hibernate is done with its schema updates).The text was updated successfully, but these errors were encountered: