跨域配置文件
作者:互联网
@SuppressWarnings("deprecation") @Configuration public class CrossConfiguration extends WebMvcConfigurerAdapter { @Bean public WebMvcConfigurer corsConfigurer() { return new WebMvcConfigurerAdapter() { @Override public void addCorsMappings(CorsRegistry registry) { registry.addMapping("/**"); } }; } }
标签:deprecation,return,跨域,配置文件,WebMvcConfigurerAdapter,registry,public 来源: https://www.cnblogs.com/dsds/p/16358383.html