spring4.2添加对cros请求的支持

it2022-05-05  102

@Configuration public class WebConfiguration extends WebMvcConfigurerAdapter { @Override public void addInterceptors(InterceptorRegistry registry) { registry.addInterceptor(new UserSecurityInterceptor()); } @Override public void addCorsMappings(CorsRegistry registry) { registry.addMapping("/**"); } }

  参考文章:http://blog.csdn.net/isea533/article/details/50449907

转载于:https://www.cnblogs.com/lifeix-gcc/p/5391350.html


最新回复(0)