Open rcollette opened 1 year ago
I think it would be a better example for your readers to have a controller base class method like:
private static final NOT_FOUND = ResponseEntity.notFound().build(); protected Mono<ResponseEntity<T>> OkOrNotFound(Mono<T> result){ return result.map(ResponseEntity::ok).defaultIfEmpty(NOT_FOUND); }
In use it's now just
return OkOrNotFound(result);
I think it would be a better example for your readers to have a controller base class method like:
In use it's now just