Created
January 10, 2021 18:03
-
-
Save kamalhm/070e6a812f89ea63353513c6d2211fd7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RestController | |
@RequestMapping(value = "/api/member") | |
@RequiredArgsConstructor | |
public class MemberController { | |
private final MemberRepository memberRepository; | |
@GetMapping | |
public Flux<Member> getAll() { | |
return memberRepository.findAll(); | |
} | |
@GetMapping(value = "/{name}") | |
public Mono<Member> getOne(@PathVariable String name) { | |
return memberRepository.findByName(name); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment