@@ -0,0 +1,813 @@
+package com.scut.vsp.config.security;%0A%0Aimport org.springframework.context.annotation.Configuration;%0Aimport org.springframework.web.servlet.config.annotation.CorsRegistry;%0Aimport org.springframework.web.servlet.config.annotation.EnableWebMvc;%0Aimport org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;%0A%0A/**%0A * Created by ASH on 21/04/2017.%0A */%0A%0A@Configuration%0A@EnableWebMvc%0Apublic class WebConfig extends WebMvcConfigurerAdapter %7B%0A    @Override%0A    public void addCorsMappings(CorsRegistry registry) %7B%0A        registry.addMapping(%22/v1/**%22)%0A                .allowedOrigins(%22*%22)%0A                .allowedMethods(%22GET%22, %22POST%22, %22DELETE%22, %22PUT%22)%0A                .allowedHeaders(%22Content-Type%22, %22X-Authorization%22, %22X-Requested-With%22)%0A                .allowCredentials(false).maxAge(3600);%0A    %7D%0A%7D%0A

添加 CORS 支持