解决 ajax跨域 No 'Access-Control-Allow-Origin' header is present on the requested resource.
2017-12-29 12:08
1066 查看
在controller中加入 @CrossOrigin 注解
@RequestMapping(value = "getComputerOfJudgeByPaperNum") @ResponseBody @CrossOrigin(origins = "*", maxAge = 3600) public List<ComputerOfJude> getComputerOfJudgeByPaperNum(String paperNum){ List<ComputerOfJude> computerOfJudeList = loadExamService.getComputerOfJudgeByPaperNum(paperNum); return computerOfJudeList; }
相关文章推荐
- ajax跨域请求:No 'Access-Control-Allow-Origin' header is present on the requested resource
- 本地Ajax跨域访问 No 'Access-Control-Allow-Origin' header is present on the requested resource.
- 解决“No 'Access-Control-Allow-Origin' header is present on the requested resource”
- 解决“No 'Access-Control-Allow-Origin' header is present on the requested resource.”
- 解决 js ajax跨域访问报“No 'Access-Control-Allow-Origin' header is present on the requested resource.”错误
- AJAX跨越、JS跨越请求 No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin
- 跨域问题:No 'Access-Control-Allow-Origin' header is present on the requested resource.
- 跨域问题:“No 'Access-Control-Allow-Origin' header is present on the requested resource”
- js跨域访问,no 'access-control-allow-origin' header is present on the requested resource
- jquery ajax No 'Access-Control-Allow-Origin' header is present on the requested resource
- No 'Access-Control-Allow-Origin' header is present on the requested resource解决方法
- No 'Access-Control-Allow-Origin' header is present on the requested resource.一种解决思路
- No 'Access-Control-Allow-Origin' header is present on the requested resource. 报错解决。
- 解决 js ajax跨域访问报“No 'Access-Control-Allow-Origin' header is present on the requested resource.”错误
- 解决Vue请求 ‘No 'Access-Control-Allow-Origin' header is present on the requested resource’错误
- 跨域 No 'Access-Control-Allow-Origin' header is present on the requested resource
- JS跨域:No 'Access-Control-Allow-Origin' header is present on the requested resource
- 解决 js ajax跨域访问报“No 'Access-Control-Allow-Origin' header is present on the requested resource.”错误
- No 'Access-Control-Allow-Origin' header is present on the requested resource.
- Vue报错笔记(2):No 'Access-Control-Allow-Origin' header is present on the requested resource.