Skip to content

Cyclic dependencies during bean initialization #32

@ThomasJejkal

Description

@ThomasJejkal

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions