Sonar static code analysis tells me this is a code smell and should be converted to a lamdba.
public WebMvcConfigurer corsConfigurer() {
return new WebMvcConfigurer() {
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**")
.allowedOrigins("*")
.allowedMethods("*");
}
};
}
I've tried various approaches with no luck. Any help is appreciated.