public class SzptbApplication implements WebMvcConfigurer {
public static void main(String[] args){
SpringApplication.run(SzptbApplication.class, args);
}
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**")
.allowCredentials(true)
.allowedHeaders("*")
.allowedOrigins("*")
.allowedMethods("*");
}
}
springboot跨域配置
最新推荐文章于 2023-02-22 17:54:34 发布