Spring Boot Controller
@Controller
@Controller@Controller
@RequestMapping("books")
public class SimpleBookController {
@GetMapping("/{id}", produces = "application/json")
public @ResponseBody Book getBook(@PathVariable int id) {
}
}@RestController
@RestController@RestController
@RequestMapping("books-rest")
public class SimpleBookRestController {
@GetMapping("/{id}", produces = "application/json")
public Book getBook(@PathVariable int id) {
}
}@RequestMapping
@RequestMapping@RequestBody
@RequestBody@PathVariable
@PathVariable@PathVariable
@PathVariable@RequestParam
@RequestParamHTTP Mapping
@ResponseEntity
@ResponseEntityLast updated