user3577622
user3577622

Reputation: 167

Quarkus service to use another Quarkus project service

I would like to load one Quarkus project in my other main Quarkus project.

I tried @ApplicationScoped in the subproject and @Inject in the main project however object is not getting initialized.

it throws error javax.enterprise.inject.UnsatisfiedResolutionException: Unsatisfied dependency for type

if Initialize with new it works

Like

@Inject 
Foo foo

throws error however

Foo foo = new Foo(); 

will work but it won't initialize the quarks objects like mongoClinet .. etc.

Upvotes: 1

Views: 324

Answers (1)

Kirill Byvshev
Kirill Byvshev

Reputation: 131

Quarkus doesn't discover beans in the dependents libraries. I think adding of jandex-maven-plugin for your other project and package it again can help to solve th.

There is more info about that - maven-tooling

Upvotes: 2

Related Questions