标签:跨域访问 访问 post ext xtend ons desc addm des
/**
* 跨域设置
* @Version 1.0.0
* @Description
*/
@Configuration
public class CorsConfig extends WebMvcConfigurationSupport {
@Override
protected void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**")
.allowedOrigins("*")
.allowCredentials(true)
.allowedMethods("GET","POST","DELETE","PUT")
.maxAge(3600);
}
}
标签:跨域访问 访问 post ext xtend ons desc addm des
原文地址:https://www.cnblogs.com/lazyli/p/12228931.html