-
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
Quarkus REST abstract resources with @Path requires impl. to be CDI beans while RESTEasy does not #41567
Comments
I am not sure about this really, but I guess if we do it for the interface, we should do it for abstract classes as well. |
I am not sure either. The reason why I care for this is that even when I annotated class that extends abstract parent with |
No worries, I'll look into it when I have some time. |
Thank you. |
🙏🏼 |
Allow use of abstract classes in Quarkus REST in the same way as interfaces
…rfaces Fixes: quarkusio#41567 (cherry picked from commit c56532c)
…rfaces Fixes: quarkusio#41567 (cherry picked from commit c56532c)
Describe the bug
I have mentioned that abstract class like this:
with implementation:
requires
GreetingResource
to have bean defining annotation while RESTEasy does not.Expected behavior
Thrown exception is pretty straightforward, I suppose it is not necessary to document it in https://quarkus.io/guides/rest-migration. I can also imagine that if there is more than one implementor of the
AbstractGreetingResource
that wouldn't work.So this issue may not be a bug but a
kind/question
. Isn't situation with interface same and it still works? I can replace theAbstractGreetingResource
parent with interface like below and the exception is gone:Actual behavior
Exception is thrown during a processing of an HTTP request:
How to Reproduce?
Steps to reproduce the behavior:
git clone git@github.com:michalvavrik/abstract-quarkus-rest-repro.git
cd app
mvn clean test
(failure)sed -i "s#<artifactId>quarkus-rest</artifactId>#<artifactId>quarkus-resteasy</artifactId>#g" pom.xml
(use RESTEasy)mvn clean test
(success)Output of
uname -a
orver
Fedora 38
Output of
java -version
OpenJDK 21
Quarkus version or git rev
3.12.0
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.9.8
Additional information
No response
The text was updated successfully, but these errors were encountered: