后台方法添加HttpServletResponse response=ServletActionContext.getResponse(); response.addHeader("Access-Control-Allow-Origin","*"); 即可实现跨域访问