标签:map conf get delete mvcc 跨域 跨域访问 sre spring
/**
* 配置跨域访问
*
* @author Terwer
*/
@Bean
public WebMvcConfigurer corsConfigurer() {
return new WebMvcConfigurer() {
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/api/**")
.allowedOrigins("*")
.allowCredentials(true)
.allowedMethods("GET", "POST", "DELETE", "PUT", "PATCH")
.maxAge(3600);
}
};
}
标签:map conf get delete mvcc 跨域 跨域访问 sre spring
原文地址:https://www.cnblogs.com/tangyouwei/p/10579029.html