Commit 1e69a9ae by liushuangwu

Merge remote-tracking branch 'origin/master'

2 parents 9947cdaa 39c35eba
......@@ -98,12 +98,18 @@ public class WebMvcConfigurer extends WebMvcConfigurerAdapter {
});
}
//解决跨域问题
@Override
public void addCorsMappings(CorsRegistry registry) {
//registry.addMapping("/**");
registry.addMapping("/**")
.allowedOrigins("*")
.allowedMethods("POST", "GET", "PUT", "OPTIONS", "DELETE")
.allowCredentials(true)
.allowedHeaders("*")
.maxAge(3600);
WebMvcConfigurer.super.addCorsMappings(registry);
}
//添加拦截器
@Override
public void addInterceptors(InterceptorRegistry registry) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!