Guest User

Untitled

a guest
Mar 23rd, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. @RestController
  2. public class PersonController {
  3.  
  4. private final PersonRepository personRepository;
  5.  
  6. public PersonController(PersonRepository personRepository) {
  7. this.personRepository = personRepository;
  8. }
  9.  
  10. @GetMapping("/people")
  11. public Flux<Person> all() {
  12. return personRepository.findAll();
  13. }
  14.  
  15. @GetMapping("/people/{id}")
  16. Mono<Person> findById(@PathVariable String id) {
  17. return personRepository.findOne(id);
  18. }
  19. }
Add Comment
Please, Sign In to add comment