我正在尝试使用Spring 5 WebClient记录请求.你知道我怎么能实现这个目标吗?
(我使用的是Spring 5和Spring boot 2)
代码现在看起来像这样:
try {
return webClient.get().uri(url, urlParams).exchange().flatMap(response -> response.bodyToMono(Test.class))
.map(test -> xxx.set(test));
} catch (RestClientException e) {
log.error("Cannot get counter from opus", e);
throw e;
}
Run Code Online (Sandbox Code Playgroud)