@RequestMapping(value ="/websitePositionList", method = RequestMethod.POST)
public Map<String,Object> check2(PositionInfo positionInfo,HttpServletResponse response)throws UnsupportedEncodingException{
response.addHeader("Access-Control-Allow-Origin", "*");
response.addHeader("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS");
response.setHeader("Access-Control-Allow-Headers", "x-requested-with");
response.addHeader("Access-Control-Max-Age", "1800");//30 min***
return map;
}
springboot 跨域 ajax返回值跨域
最新推荐文章于 2024-05-06 18:35:01 发布