May 2018
Intermediate to advanced
310 pages
6h 18m
English
We can map requests in several ways and support multiple methods with different media types (JSON, XML, and so on). For HTTP method mapping, Spring supports the following annotations:
The same can be achieved like this:
@RequestMapping(
method = arrayOf(RequestMethod.GET),
value = "/obtain",
produces = arrayOf(MediaType.APPLICATION_JSON_VALUE)
) fun getNotes(): String ...
Let's take a look at the parameters which annotations accept. Open the source code for the @GetMapping annotation. You will notice that actually, all parameters are ...
Read now
Unlock full access