Springboot 前端请求的每次sessionid 都不同

1. 先检测浏览器是否有设置禁止保存第三方cookie信息

2.跨域问题处理

后端代码:

添加跨域配置(参考我这篇):
https://blog.csdn.net/qq_35387940/article/details/106123805

一般出现跨域问题,就是因为前后端分离导致的。

前端代码:

vue:

axios.defaults.withCredentials = true;

猜你喜欢

转载自blog.csdn.net/qq_35387940/article/details/109066613