@Configuration @RequiredArgsConstructor public class WebConfig implements WebMvcConfigurer { @Override public void addCorsMappings(CorsRegistry registry) { final List httpMethods = Arrays.stream(HttpMethod.values()) .map(HttpMethod::name) .collect(Collectors.toList()); String[] allowedMethods = new String[httpMethods.size()]; registry.addMapping("/**") .allowedMethods(httpMethods.toArray(allowed..