Created
June 7, 2024 11:42
-
-
Save roman4ello/52658e2252b279942ade40e970cd6a05 to your computer and use it in GitHub Desktop.
Jakarta controller annotations to Spring annotations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Jakarta RESTful Web Services | Spring REST | What it does | | |
|------------------------------|------------------------------|-------------------------------------------------------------------| | |
| @PathParam | @PathVariable | Binds the method parameter to a path segment. | | |
| @QueryParam | @RequestParam | Binds the method parameter to the value of an HTTP query parameter.| | |
| @MatrixParam | @MatrixVariable | Binds the method parameter to the value of an HTTP matrix parameter.| | |
| @HeaderParam | @RequestHeader | Binds the method parameter to an HTTP header value. | | |
| @CookieParam | @CookieValue | Binds the method parameter to a cookie value. | | |
| @FormParam | @RequestParam | Binds the method parameter to a form value. | | |
| @DefaultValue | @Value | Specifies a default value for the above bindings when the key isn't found.| | |
| @Context | @Autowired/@Inject | Injects an instance of a resource class, provider, or context object.| | |
| @Auth(io.dropwizard.auth) | @AuthenticationPrincipal | Binds the method parameter to the currently authenticated user. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment