Skip to content

Instantly share code, notes, and snippets.

@shazin
Created September 10, 2017 05:15
Show Gist options
  • Save shazin/5db4242b81640187fb8dccc48d3d0354 to your computer and use it in GitHub Desktop.
Save shazin/5db4242b81640187fb8dccc48d3d0354 to your computer and use it in GitHub Desktop.
@RestController
@RequestMapping("/people")
public class PeopleController {
@Autowired
private PersonService blockingService;
@GetMapping
public Flux<Person> getPeople() {
return Flux.fromIterable(blockingService.getPeople());
}
@GetMapping("/blocking")
public List<Person> getPeopleBlocking() {
return blockingService.getPeople();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment