@Test public void TestGetAllEmpployees() { WebClient client = WebClient.builder().baseUrl("localhost:8080").build(); client.get().uri("/employees") .exchange() .doOnSuccess(clientResponse -> { clientResponse.bodyToFlux(Employee.class).subscribe(employee -> System.out.println("$$$$$$$$$$$$$")); }) .doOnError(throwable -> throwable.printStackTrace()); }
@GetMapping("/employees") private Flux<Employee> getAllEmpployees() { return employeeService.findAll(); }
EmployeeController { @GetMapping("/employees") private Flux<Employee> getAllEmpployees() { return employeeService.findAll(); } }
EmployeeController { @GetMapping("/employees") private Flux<Employee> getAllEmpployees() { return employeeService.findAll(); }  }
EmployeeController { @GetMapping("/employees") private Flux<Employee> getAllEmpployees() { return employeeService.findAll(); }   }
EmployeeController { @GetMapping("/employees") private Flux<Employee> getAllEmpployees() { return employeeService.findAll(); }    }