百度一晚上,都是说要设置
axios.defaults.withCredentials=true;
然后在controller 上加上
@CrossOrigin(origins = "http://localhost:9080", maxAge = 3600)
其实根本不好用,还少一个参数
allowCredentials = "true"
下面这样才行因为 allowCredentials 默认是 "false"
@CrossOrigin(origins = "http://localhost:9080", maxAge = 3600,allowCredentials = "true")