标签:ddc toolbar pos try sre head ppi reg extend
在访问web工程的时候,经常会报一些跨域的错误:CORS header ‘Access-Control-Allow-Origin’ missingspring boot中的cors设定方式
@Configuration public class WebConfig extends WebMvcConfigurerAdapter { @Override public void addCorsMappings(CorsRegistry registry) { registry.addMapping("/**") .allowedOrigins("*") .allowCredentials(true) .allowedMethods("GET", "POST", "DELETE", "PUT") .maxAge(3600); } }
标签:ddc toolbar pos try sre head ppi reg extend
原文地址:http://blog.51cto.com/xinzhilian/2057550