Chapter 8. Overview of Spring Web annotations supported in Quarkus

The Spring compatibility layer in Quarkus supports a limited subset of features that Spring Web provides. Specifically, Quarkus supports only the REST-related annotations from Spring Web, for example, @RestController, but not @Controller.

Quarkus supports the following annotations from Spring Web:

  • @RestController
  • @RequestMapping
  • @GetMapping
  • @PostMapping
  • @PutMapping
  • @DeleteMapping
  • @PatchMapping
  • @RequestParam
  • @RequestHeader
  • @MatrixVariable
  • @PathVariable
  • @CookieValue
  • @RequestBody
  • @ResponseStatus
  • @ExceptionHandler [1]
  • @RestControllerAdvice [2]


[1] Can only be used in a @RestControllerAdvice class, not on a per-controller basis.
[2] Only the @ExceptionHandler capability is supported in Quarkus.