-
Notifications
You must be signed in to change notification settings - Fork 2.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
Cannot Inject Configuration Interface into ContainerRequestFilter Through Constructor #8180
Comments
Let me check this |
AFAIK they're |
However, I'm not sure whether we support constructor injection on providers... |
Makes sense
Yeah, it doesn't work that well. RESTEasy isn't playing nice with us, so I wonder if we should just warn (or fail) at build time... |
That would work for me and would have helped much faster then the runtime error. 👍 |
Add warning about @Provider constructors
Describe the bug
Injecting configuration interface into
ContainerRequestFilter
through constructor-based injection creates 500 respones with following error message:Expected behavior
ContainerRequestFilter
should work with construtor-based injection to avoid warnings:However, if I add
@ApplicationScoped
to the filter it works.It would be nice if quarkus provides some diagnose.
To Reproduce
Steps to reproduce the behavior:
ContainerRequestFilter
:Environment (please complete the following information):
uname -a
orver
: Darwin Kernel Version 19.0.0: Thu Oct 17 16:17:15 PDT 2019; root:xnu-6153.41.3~29/RELEASE_X86_64 x86_64java -version
: openjdk version "13.0.2" 2020-01-14mvnw --version
orgradlew --version
): mvn 3.6.1The text was updated successfully, but these errors were encountered: