2020
10-08
10-08
Spring前后端跨域请求设置代码实例
前后端项目分离,跨域请求时,后端的两种配置方式:1.配置类:packagecom.helq3.config;importorg.springframework.context.annotation.Bean;importorg.springframework.context.annotation.Configuration;importorg.springframework.web.cors.CorsConfiguration;importorg.springframework.web.cors.UrlBasedCorsConfigurationSource;importorg.springframework.web.filter.CorsFilter;/***跨域全局配置*/@Configuration...
继续阅读 >