quarkusio/quarkus · error · IllegalArgumentException
Unsupported HTTP method '<method>' for @RequestMapping. Offe
Error message
Unsupported HTTP method '<method>' for @RequestMapping. Offending method is '<class>#<method>'
What it means
The reactive Spring Web processor maps the RequestMethod enum value in @RequestMapping to a built-in JAX-RS verb annotation via METHOD_TO_BUILTIN_HTTP_ANNOTATIONS. An HTTP method name outside the supported set (GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS) has no mapping and fails the build with this message naming the offending class and method.
Source
Thrown at extensions/spring-web/resteasy-reactive/deployment/src/main/java/io/quarkus/spring/web/resteasy/reactive/deployment/SpringWebResteasyReactiveProcessor.java:245
String path = null;
String[] produces = null;
String[] consumes = null;
AnnotationInstance mappingAnnotationInstance = methodInfo.annotation(REQUEST_MAPPING);
if (mappingAnnotationInstance != null) {
AnnotationValue methodValue = mappingAnnotationInstance.value("method");
if (methodValue == null) {
jaxRSMethodAnnotation = ResteasyReactiveDotNames.GET;
} else {
String[] methods = methodValue.asEnumArray();
if (methods.length > 1) {
throw new IllegalArgumentException(
"Usage of multiple methods using '@RequestMapping' is not allowed. Offending method is '"
+ methodInfo.declaringClass().name() + "#" + methodInfo.name() + "'");
}
DotName methodDotName = ResteasyReactiveScanner.METHOD_TO_BUILTIN_HTTP_ANNOTATIONS.get(methods[0]);
if (methodDotName == null) {
throw new IllegalArgumentException(
"Unsupported HTTP method '" + methods[0] + "' for @RequestMapping. Offending method is '"
+ methodInfo.declaringClass().name() + "#" + methodInfo.name() + "'");
}
jaxRSMethodAnnotation = methodDotName;
}
} else {
if (methodInfo.hasAnnotation(GET_MAPPING)) {
jaxRSMethodAnnotation = ResteasyReactiveDotNames.GET;
mappingAnnotationInstance = methodInfo.annotation(GET_MAPPING);
} else if (methodInfo.hasAnnotation(POST_MAPPING)) {
jaxRSMethodAnnotation = ResteasyReactiveDotNames.POST;
mappingAnnotationInstance = methodInfo.annotation(POST_MAPPING);
} else if (methodInfo.hasAnnotation(PUT_MAPPING)) {
jaxRSMethodAnnotation = ResteasyReactiveDotNames.PUT;
mappingAnnotationInstance = methodInfo.annotation(PUT_MAPPING);
} else if (methodInfo.hasAnnotation(DELETE_MAPPING)) {
jaxRSMethodAnnotation = ResteasyReactiveDotNames.DELETE;
mappingAnnotationInstance = methodInfo.annotation(DELETE_MAPPING);View on GitHub (pinned to e1c734241f)
Solutions
- Use a standard HTTP verb (GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS) in @RequestMapping.
- Use the shortcut annotations (@GetMapping, @PostMapping, etc.) to avoid naming mistakes.
- For nonstandard verbs, fall back to plain JAX-RS @HttpMethod with a custom annotation instead of Spring annotations.
Example fix
// before
@RequestMapping(value = "/data", method = RequestMethod.GTES) // typo
// after
@GetMapping("/data") Defensive patterns
Strategy: validation
Validate before calling
// allowed: GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS // verify: @RequestMapping(method = RequestMethod.GET)
Prevention
- Use the typed RequestMethod enum values exactly; avoid typos by using shortcut annotations.
- Keep a migration checklist that maps each Spring mapping annotation to the Quarkus-supported verb set.
When it happens
Trigger: Using @RequestMapping(method = RequestMethod.X) where X is a custom/typo'd or unsupported verb, e.g. RequestMethod.TRACE or a misspelled value.
Common situations: Typos in method names; Spring code using rarely used verbs; custom RequestMapping meta-annotations that inject unexpected values.
Related errors
- Usage of multiple methods using '@RequestMapping' is not all
- The combination of '@${annotationName}' and '@ServerRequestF
- The combination of '@${annotationName}' and '@ServerExceptio
- Parameter type <type> is being used multiple times in method
- Parameter type <type> is not supported for method<method> of
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/4d1f964a298f4cdf.
Report an issue: GitHub.