June 2017
Intermediate to advanced
496 pages
14h 4m
English
We will create a new RestController annotation called TodoController. The code for the retrieve todos method is shown as follows:
@RestController public class TodoController { @Autowired private TodoService todoService; @GetMapping("/users/{name}/todos") public List<Todo> retrieveTodos(@PathVariable String name) { return todoService.retrieveTodos(name); } }
A couple of things to note are as follows:
Read now
Unlock full access