-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Problem with Context injection in jersey 2 #7122
Comments
My suggestion is to try the latest master (2.3.0). The SNAPSHOT version can be found in the README. |
any news on that issue? :) |
the second solution that @paclat suggested doesn't work (at least for me). Although, the first one does. `package {{package}}; import {{modelPackage}}.*; import io.swagger.annotations.ApiParam; {{#imports}}import {{import}}; import java.util.Map; import java.io.InputStream; import org.glassfish.jersey.media.multipart.FormDataContentDisposition; import javax.annotation.PostConstruct; {{#commonPath}}@path("/{{{commonPath}}}"){{/commonPath}}{{^commonPath}}@path(""){{/commonPath}} @PostConstruct
} {{#operation}} |
Is the issue resolved? Am using Codegen 3.0.5 , facing same issue mentioned with JAX-RS 2.0 , Weblogic 12.2.1.3 . Sample application is working fine . It was tested on Tomcat Server. Only difference I see is in sample app class - at org.jvnet.hk2.internal.ClazzCreator is called instead of FactoryCreator. |
i recently updated the openAPI codeGen to version 6.5.0 |
Description
The issue that I am hitting is that in the environment that I am using the injection with the constructor that is annotated with @context does not seem to be working properly...
The underlying problem is captured in the posting below ...
https://stackoverflow.com/questions/37683765/jersey-constructor-injection-with-context-not-working
Swagger-codegen version
2.22.3
It originated with the change at..
#5662
Swagger declaration file content or url
`
Command line used for generation
Steps to reproduce
Create a war from the above and deploy it. curl the target and you will get an exception of the kind..
Related issues/PRs
Suggest a fix/enhancement
The following changes seemed to resolve the issue when made manually...
Alternatively, I was wondering if it might make sense to just use direct injection as an option..
As in....
Then adding...
and...
This would make it really easy to override or use qualifiers without having to modify any source code or even descriptors..
The text was updated successfully, but these errors were encountered: