后台方法添加

HttpServletResponse response=ServletActionContext.getResponse();
response.addHeader("Access-Control-Allow-Origin","*");

即可实现跨域访问

05-11 16:07