remake of REST Controllers
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
|
||||
package com.htopweb.system;
|
||||
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import reactor.core.publisher.Mono;
|
||||
import reactor.core.scheduler.Schedulers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -19,7 +22,8 @@ public class SystemProcessesController {
|
||||
}
|
||||
|
||||
@GetMapping("/processes")
|
||||
public List<ProcessInfoResponse> getProcesses() {
|
||||
return _systemProcessesService.getProcesses();
|
||||
public Mono<List<ProcessInfoResponse>> getProcesses() {
|
||||
return Mono.fromCallable(_systemProcessesService::getProcesses)
|
||||
.subscribeOn(Schedulers.boundedElastic());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user