Skip to content
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

Cyclic dependencies during bean initialization #32

Open
ThomasJejkal opened this issue Aug 3, 2022 · 0 comments
Open

Cyclic dependencies during bean initialization #32

ThomasJejkal opened this issue Aug 3, 2022 · 0 comments

Comments

@ThomasJejkal
Copy link
Contributor

Describe the bug
As of spring-boot 2.6 it is no longer allowed to have cycles during dependency injection. Before, spring-boot tried to resolve cycles as far as possible (which seemed to work for repo-core) but it doesn't anymore. Most of the existing cycles could be resolved in repo-core v1.0.3, but some cleanup will be required.

This bug mostly affects the way of using RepoBaseConfiguration. This class is used as carrier for all properties and beans, which are then propagated to each other and used as required. While creating this Bean, cycles may occur as the order of creating RepoBaseConfiguration matters.

E.g., the IRepoStorageService has to be identified and configured before IRepoVersioningService is configured, as IRepoVersioningService uses IRepoStorageService. Otherwise, an error will be thrown at startup time.

A solution would only be implementing a proper dependency injection, which probably requires a lot of restructuring and should be part of the next major release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant