Vue+boot+JWT报错Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'token')
可能是你的controller返回给前端的是字符串,前端收到的不是字符串而是伪字符串,就需要改这段
response.getWriter().write(JSON.toJSONString(res));
罪魁祸首是这个不可以转换成字符串
Vue+boot+JWT报错Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'token')
可能是你的controller返回给前端的是字符串,前端收到的不是字符串而是伪字符串,就需要改这段
response.getWriter().write(JSON.toJSONString(res));
罪魁祸首是这个不可以转换成字符串