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

Automatic bean discovery for multiple named eclipsestore-Root-providers #98

Open
cloudwy opened this issue Sep 5, 2024 · 0 comments
Open

Comments

@cloudwy
Copy link

cloudwy commented Sep 5, 2024

Feature description

I want to add two eclipse store databases and it was failed when trying to create two different root providers.

application.yml

eclipsestore:
    storage:
        dependency:
            root-class: example.micronaut.dependency.DependencyContainer
            storage-directory: build/eclipsestore/dependencies
            channel_count: 4
        fruit:
            root-class: example.micronaut.fruits.FruitContainer
            storage-directory: build/eclipsestore/fruit
            channel_count: 4

FruitRepositoryImpl.java

FruitRepositoryImpl( RootProvider<FruitContainer> rootProvider) { 
        this.rootProvider = rootProvider;
    }

I thought that micronaut will discover the bean automatically, because the root provider type-definition matches to the defined root class in the eclipsestore setting.

But now I need to add @Named("fruit") annotation to make it work, could you please add some information in the tutorial or implement automatic bean discovery?

@cloudwy cloudwy changed the title Automatical bean discovery for multiple named eclipsestore-Root-providers Automatic bean discovery for multiple named eclipsestore-Root-providers Sep 5, 2024
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