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

The Rest Client object should have the @Inject annotation to be injected as a CDI bean. microprofile-restclient(InjectAnnotationMissing) #730

Open
gian1200 opened this issue May 5, 2024 · 0 comments

Comments

@gian1200
Copy link

gian1200 commented May 5, 2024

Warning:
The Rest Client object should have the @Inject annotation to be injected as a CDI bean. microprofile-restclient(InjectAnnotationMissing)

image

Quarkus documentation says

the client stub is injected with the @RestClient annotation instead of the usual CDI @Inject

Which one is correct? Should the warning or the Quarkus doc be updated?

If adding both @Inject and @RestClient is recommended, what's the equivalent with constructor injection? (sonarlint suggests it over field injection)

  • Update:

Related: #708

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