@GetMapping: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 2: | Line 2: | ||
* [[Spring MVC Concepts#.40GetMapping|Spring MVC Concepts]] | * [[Spring MVC Concepts#.40GetMapping|Spring MVC Concepts]] | ||
* [[Spring REST Concepts|Spring REST Concepts]] | |||
=Overview= | =Overview= |
Revision as of 01:27, 13 March 2019
Internal
Overview
The annotation indicates that the annotated method handles GET request for the path provided as argument of the annotation.
It may also contain a sub-path relative to the class-level base path, usually configured with @RequestMapping.
REST
@RestController
@RequestMapping(path = "/a", produces = "application/json")
public class AController {
@GetMapping
public Collection<A> get() {
return ...
}
}