Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @RestController
- public class PersonController {
- private final PersonRepository personRepository;
- public PersonController(PersonRepository personRepository) {
- this.personRepository = personRepository;
- }
- @GetMapping("/people")
- public Flux<Person> all() {
- return personRepository.findAll();
- }
- @GetMapping("/people/{id}")
- Mono<Person> findById(@PathVariable String id) {
- return personRepository.findOne(id);
- }
- }
Add Comment
Please, Sign In to add comment