if(Pattern.matches(regex, reader.nextLine()));
Str.add(reader.nextLine())
public List<Response> getAdditionalData(List<ExcelModel> excelList) {
return Flux.fromIterable(excelList) // Превращаем лист во флюкс
.flatMap(excel -> webClient.get() // по каждому элемену делаем асинхронный запрос
.uri(sybase + excel.getTransactionID())
.retrieve()
.bodyToMono(Response.class))
.collectList() // Собираем поток в лист. Тут получается Mono<List<Response>>
.block(); // Блокируем тред и ждем завершения. Можно в скобочках указать сколько ждать.
}
public Flux<Response> getAdditionalData(List<ExcelModel> excelList) {
return Flux.fromIterable(excelList)
.flatMap(excel -> webClient.get()
.uri(sybase + excel.getTransactionID())
.retrieve()
.bodyToMono(Response.class));
}
import java.util.Arrays;
import java.util.stream.Collectors;
public class CamelCase {
public static void main(String[] args) {
System.out.println(toCamelCase("this-is-it"));
System.out.println(toCamelCase("This_is_it"));
}
static String toCamelCase(String input) {
var strings = input.split("[-_]");
return strings[0].concat(Arrays.stream(strings)
.sequential()
.skip(1)
.map(CamelCase::capitalizeFirst)
.collect(Collectors.joining()));
}
private static String capitalizeFirst(String s) {
return s.substring(0,1).toUpperCase().concat(s.substring(1));
}
}
Authorization: Basic <credentials>
, где credentials - это логин и пароль, зашифрованные в base64 и разделённые двоеточием.