-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Spring controller silently ignored if mapping is defined in interface and if there's an error in it #43704
Labels
Milestone
Comments
/cc @geoand (spring) |
/cc @aureamunoz |
@aureamunoz any chance you could have a look at this one? |
Yes, I will |
aureamunoz
added a commit
to aureamunoz/quarkus
that referenced
this issue
Nov 22, 2024
aureamunoz
added a commit
to aureamunoz/quarkus
that referenced
this issue
Nov 26, 2024
aureamunoz
added a commit
to aureamunoz/quarkus
that referenced
this issue
Nov 27, 2024
aureamunoz
added a commit
to aureamunoz/quarkus
that referenced
this issue
Nov 27, 2024
aureamunoz
added a commit
to aureamunoz/quarkus
that referenced
this issue
Nov 28, 2024
aureamunoz
added a commit
to aureamunoz/quarkus
that referenced
this issue
Nov 29, 2024
aureamunoz
added a commit
to aureamunoz/quarkus
that referenced
this issue
Dec 3, 2024
aureamunoz
added a commit
to aureamunoz/quarkus
that referenced
this issue
Dec 5, 2024
aureamunoz
added a commit
to aureamunoz/quarkus
that referenced
this issue
Dec 9, 2024
aureamunoz
added a commit
to aureamunoz/quarkus
that referenced
this issue
Dec 9, 2024
aureamunoz
added a commit
to aureamunoz/quarkus
that referenced
this issue
Dec 10, 2024
aureamunoz
added a commit
to aureamunoz/quarkus
that referenced
this issue
Dec 11, 2024
aureamunoz
added a commit
to aureamunoz/quarkus
that referenced
this issue
Dec 12, 2024
aureamunoz
added a commit
to aureamunoz/quarkus
that referenced
this issue
Dec 12, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Describe the bug
This is probably related to the Spring extension. The symptom is that Quarkus build succeeds when it should've failed when an interface defining a controller contains errors.
This issue makes it pretty tricky to migrate Spring applications as the generated artifact just silently doesn't include endpoints defined in such controller interfaces.
Expected behavior
Build should fail, printing the error causing building a controller interface to fail.
Actual behavior
Quarkus builds successfully without printing anything about errors when building the interface. The resulting artifact doesn't contain the endpoints defined in the controller interface either.
How to Reproduce?
As an exemple, say we have an interface:
and a controller class implementing the above interface
building this code is supposed to fail with error
Cannot have more than one of @PathParam, @QueryParam, @HeaderParam, @FormParam, @CookieParam, @BeanParam, @Context on method java.lang.String hello(java.lang.String params)
(note that the error in the above example is for illustration purpose only; the real error we have is the one in #43705 )
but in reality it can build successfully, and the resulting artifact doesn't include both APIs
In comparison, if the controller is defined completely in a class like below rather than an interface, Quarkus does fail the build and prints error:
Output of
uname -a
orver
Linux 5.10.225
Output of
java -version
openjdk version "17.0.9" 2023-10-17 OpenJDK Runtime Environment GraalVM CE 17.0.9+9.1 (build 17.0.9+9-jvmci-23.0-b22) OpenJDK 64-Bit Server VM GraalVM CE 17.0.9+9.1 (build 17.0.9+9-jvmci-23.0-b22, mixed mode, sharing)
Quarkus version or git rev
3.15.1
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.9.8 (36645f6c9b5079805ea5009217e36f2cffd34256)
Additional information
No response
The text was updated successfully, but these errors were encountered: