java项目跨域问题-前端调试通过F12
var token="eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJhZG1pbiIsImlzcyI6IjEifQ.Vrr3ZSo3KVcjPFoMABbN6ir_ApGD47HsPDdoeo5gG84";
var xhr=new XMLHttpRequest();
xhr.open('GET','http://82.157.118.127:8080/v1/users/alldata?currentSize=1&pageSize=1');
xhr.setRequestHeader("token",token);
xhr.send(null);
xhr.onload = function(e) {
var xhr = e.target;
console.log(xhr.responseText);
}
2)阿里巴巴插件获取跨域问题
有朝一日同风起,扶摇直上九万里