SpringBoot+SpringSecurity 跨域
作者:互联网
@Configuration public class WebMvcConfig implements WebMvcConfigurer { @Override public void addCorsMappings(CorsRegistry registry) { registry.addMapping("/**") .allowCredentials(true) .allowedOrigins("*") .allowedMethods("GET", "POST", "OPTIONS") .maxAge(3600); } }
标签:SpringBoot,OPTIONS,maxAge,SpringSecurity,registry,addMapping,Override,public,跨域 来源: https://www.cnblogs.com/mingforyou/p/14633615.html