'Should input parameter in controller be Mono in Webflux?
Should the controller method expect a Mono?
@GetMapping("/resource/{id}")
fun getPayouts(request: Mono<Request>): Flux<Result> {
return request.flatMapMany {
service.processRequest(it)
}
}
While the Request object looks like
@ApiModel
class Request {
@NotNull
var id: Long? = null
@NotNull
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE)
var start: LocalDate? = null
@NotNull
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE)
var end: LocalDate? = null
}
I wasn't successful in finding docs on that. Maybe you can point me in the right direction
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
