一、Ajax跨域访问
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin
参考https://blog.csdn.net/zhoucheng05_13/article/details/53580683
一、服务器端解决
@ResponseBody @GetMapping("/userSource.json") public Object userSource(String search,HttpServletResponse response) { System.out.println(search); response.setHeader("Access-Control-Allow-Origin", "*"); return getUserSourceService().findAll(); }