@DeleteMapping: Difference between revisions
Jump to navigation
Jump to search
(→REST) |
|||
Line 11: | Line 11: | ||
<syntaxhighlight lang='java'> | <syntaxhighlight lang='java'> | ||
@RestController | @RestController | ||
@RequestMapping(path = "/a | @RequestMapping(path = "/a") | ||
public class AController { | public class AController { | ||
Revision as of 03:13, 13 March 2019
Internal
Overview
The annotation may also contain a sub-path relative to the class-level base path, usually configured with @RequestMapping.
REST
@RestController
@RequestMapping(path = "/a")
public class AController {
@DeleteMapping(path = "/{id}")
@ResponseStatus(code = HttpStatus.NO_CONTENT)
public void delete(@PathVariable("id") Integer id) {
content.remove(id);
}
}