Merge pull request #13598 from ulisseslima/bael-1814-quickfix_spring-webflux

BAEL0-1814 - Guide to Spring 5 WebFlux - quick fix
This commit is contained in:
Loredana Crusoveanu 2023-03-07 18:35:17 +02:00 committed by GitHub
commit bcd02ae908
1 changed files with 3 additions and 3 deletions

View File

@ -22,17 +22,17 @@ public class EmployeeController {
} }
@GetMapping("/{id}") @GetMapping("/{id}")
private Mono<Employee> getEmployeeById(@PathVariable String id) { public Mono<Employee> getEmployeeById(@PathVariable String id) {
return employeeRepository.findEmployeeById(id); return employeeRepository.findEmployeeById(id);
} }
@GetMapping @GetMapping
private Flux<Employee> getAllEmployees() { public Flux<Employee> getAllEmployees() {
return employeeRepository.findAllEmployees(); return employeeRepository.findAllEmployees();
} }
@PostMapping("/update") @PostMapping("/update")
private Mono<Employee> updateEmployee(@RequestBody Employee employee) { public Mono<Employee> updateEmployee(@RequestBody Employee employee) {
return employeeRepository.updateEmployee(employee); return employeeRepository.updateEmployee(employee);
} }