2种常用解决跨域方法:
1、nginx配置
在nginx.conf 配置的location 节点下加入如下配置信息:
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Headers “Origin, X-Requested-With, Content-Type, Accept”;
add_header Access-Control-Allow-Methods “GET, POST, OPTIONS”;
2、springboot注解配置
import org.springframework.context.annotation.Bean;
import org.springframework.context.</