1.目前的解决方案一: 服务器端添加注释
后台Ctroller层添加:@CrossOrigin(origins = "*", maxAge = 3600) 注释 (该注释必须使用Spring 4.0以上版本)
前端Html 中直接用ajax请求:
$.ajax({
url:"http://localhost:8080/camco/frontend/listmainpageinfo",
type:"get",//可以省略
success:function (data){
console.log(data);}
});