-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Microprofile rest client - Can't inject config/beans to providers #5752
Comments
Ok, so an easy workaround is to annotate the provider class with Looking at the RestClientBuilderImpl it seems that the creation of providers registered through I believe that this should be changed so that the provided |
+1 for me |
@geoand would you care to send a PR to resteasy? ;-) |
@mkouba sure, I'll most likely get to it this week |
@geoand it looks like something we would want for 1.1.0 so please ask for a RESTEasy release including that one before December 6th. Thanks! |
@gsmet Sure! Once I finish my current task, I'll pick up this one. |
I opened a PR in RESTEasy that forms part of the solution. |
@geoand Thanks! |
@mkouba YW! |
I'm not yet sure of when we will be able to release given all the problems we have. But I'm not sure either if RESTEasy 4.5.0.Final will be an easy upgrade. So I would say: release it, prepare a PR and we'll see how it goes :). |
Ok, that one will be for 1.2 then. |
Or if we need a 1.1.1 for some other reason, we can get this fix in as well |
4.4.2.Final is released |
@asoldano Thanks! Do you plan to create a Quarkus PR to bump the RESTEasy version? |
PR bumping the version is here: #6283 |
RESTEasy update PR was merged 10 days ago, is this issue fixed now ? |
@rsvoboda yes, I'll close it. |
From my perspective this issue is still present. Even if I upgrade the project from here to 1.2.1.Final all injected beans are still "null" |
@sassko can you open a new issue with your reproducer linked? Thanks! |
- i.e. for providers not annotated with @Provider - resolves quarkusio#7531 - follows up on quarkusio#5752
- i.e. for providers not annotated with @Provider - resolves quarkusio#7531 - follows up on quarkusio#5752
Describe the bug
Any provider added to rest client via
@Provider
annotation is unable to inject config bean or any other application scoped bean.And example the provider impl:
Expected behavior
Config or application scope bean injected and not null
Actual behavior
Any bean injected via
@Inject
is alway null (no errors in logs during argumentation nor during runtime.To Reproduce
Steps to reproduce the behavior:
mvn compile quarkus:dev
curl http://localhost:8080/echo
null
referenceConfiguration
Screenshots
N/A
Environment (please complete the following information):
uname -a
orver
:18.7.0 Darwin Kernel Version 18.7.0: Sat Oct 12 00:02:19 PDT 2019; root:xnu-4903.278.12~1/RELEASE_X86_64 x86_64
java -version
:Additional context
I found out there is a closed issue for similar problem, but looks like the fix doesn't work, see: #2773
The text was updated successfully, but these errors were encountered: