@RequestMapping: Difference between revisions
Jump to navigation
Jump to search
(→TODO) |
|||
Line 25: | Line 25: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Specifies that the handler method annotated as such will only handle requests if the request's Accept header includes the specified content type, "application/json" in this case. | Specifies that the handler method annotated as such will only handle requests if the request's [[HTTP_Request_Header_Accept|Accept]] header includes the specified content type, "application/json" in this case. |
Revision as of 19:04, 12 March 2019
Internal
Overview
General purpose request handling, that can be configured with the type of request to intercept and with the path to respond to. The HTTP method to map to is specified in the method attribute.
TODO
@RequestMapping("/something")
@RequestMapping(method=RequestMethod.GET)
@RequestMapping(path = "/a", produces = "application/json")
Data Members
path
produces
@RequestMapping(path = "/a", produces = "application/json")
Specifies that the handler method annotated as such will only handle requests if the request's Accept header includes the specified content type, "application/json" in this case.