ajax 跨域问题 No 'Access-Control-Allow-Origin' header is present on the requested resource
接口:
public String get(HttpServletResponse response) throws Exception {
response.addHeader("Access-Control-Allow-Origin","*");
return "hello";
}
如果是静态文件html,则加上<meta http-equiv="Access-Control-Allow-Origin" content="*" />