@Configuration
public class GlobalCorsConfiguration implements WebMvcConfigurer{
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**").allowedHeaders("*").allowedOrigins("*").allowedMethods("*");
}
}
网友评论