Annotation | Column |
---|---|
@Controller | Indicates that an annotated class is a "Controller" (web controller). |
@RequestMapping | Annotation for mapping web requests onto specific handler classes (if we used with class) and/or handler methods (if we used with methods). |
method = RequestMethod.GET | Type of HTTP request methods |
ResponseBody | Annotation that indicates a method return value should be bound to the web response body |
@RestController | @Controller + ResponseBody |
@ResponseEntity | Extension of HttpEntity that adds a HttpStatus status code, we can control the return http code |