public class GlobalCorsConfig extends Object
该类具体实现了全局的跨域配置, 使用了 FilterRegistrationBean 进行实现,
同时将跨域过滤器 CorsFilter 的优先级设置为最高(最先执行), 保证了跨域的有效性
注意: 该类启用的前置条件为标注了
@EnableGlobalCorsConfig 注解
EnableGlobalCorsConfig| 构造器和说明 |
|---|
GlobalCorsConfig() |
Copyright © 2021 HaiChuang Inc.. All rights reserved.