慕神4116967
2020-05-14 17:04
getitem.html?id=29:1 Access to XMLHttpRequest at 'http://localhost:8080/item/get?id+=29' from origin 'null' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
jquery-1.11.0.min.js:4 GET http://localhost:8080/item/get?id+=29 net::ERR_FAILED
xhrFields:{withCredentials:true},//session跨域
ajax里要加这个,前面有一节讲跨域的,跟着那个不要改动就行
解决了吗? 我也卡在这里,又是跨域,学个后端,一直在研究前端代码。。。
SpringBoot构建电商基础秒杀项目
49064 学习 · 954 问题
相似问题