public List<BasicDto> findByBasicIds(int[] basicIds, int min
, int max, String otherInfo) {
Consumer<ClientCodecConfigurer> consumer = configurer ->
configurer.defaultCodecs().enableLoggingRequestDetails(true);
WebClient client = WebClient.builder()
.clientConnector(new ReactorClientHttpConnector(
HttpClient.create().followRedirect(true)
))
.exchangeStrategies(ExchangeStrategies.builder()
.codecs(consumer).build())
.build();
List<BasicDto> result = client.get()
.uri(builder -> builder.scheme(REST_SCHEME)
.host(REST_SERVER).port(REST_PORT).path(REST_PATH)
.queryParam("id", Arrays.stream(basicIds)
.mapToObj(String::valueOf)
.collect(Collectors.joining(",")))
.queryParam("min", min)
.queryParam("max", max)
.queryParam("otherInfo", otherInfo)
.build())
.accept(MediaType.APPLICATION_STREAM_JSON)
.retrieve()
.bodyToFlux(BasicDto.class)
.collectList()
.block();
return result;
}