© 1999-2048 dssz.net 粤ICP备11031372号
[其它] SpringBoot+vue 在后端给浏览器设置cookie
说明:前端的vue项目在这里我使用的是axios插件发请求,首先设置 //表示跨域请求时使用凭证 axios.defaults.withCredentials = true //向后端发送一个请求,用于获取cookie this.axios.get(/setCookies) .then(res =>{ console.log(res) }) .catch(err =>{<weixin_38722317> 上传 | 大小:50kb