public Mono<ServerResponse> getExternalContactDetail(ServerRequest request) {
Mono<JSONObject> details = exterContactManageService
.monoExternalContactDetail(request.queryParam("chatId").get());
return details.flatMap(token -> ok().contentType(MediaType.APPLICATION_JSON)
.body(fromPublisher(details, JSONObject.class)))
.switchIfEmpty(notFound().build());
}
request中获取json参数是应该
request.bodyToMono(JSONObject.class); 可以吗~
你的问题解决了吗?
– 白衣风云 2年前public Mono<ServerResponse> updateDept(ServerRequest request) {
– DATA_MONK 2年前return ServerResponseBuild.
dynamicMono(request.bodyToMono(JSONObject.class),
deptManageService::updateDept,
"id");
}