解决 ajax跨域 No 'Access-Control-Allow-Origin' header is present on the requested resour

2017-12-29 19:29:52来源:CSDN作者:sunwujun123人点击

分享

在controller中加入 @CrossOrigin 注解

@RequestMapping(value = "getComputerOfJudgeByPaperNum")    @ResponseBody    @CrossOrigin(origins = "*", maxAge = 3600)    public List<ComputerOfJude>  getComputerOfJudgeByPaperNum(String paperNum){            List<ComputerOfJude> computerOfJudeList =       loadExamService.getComputerOfJudgeByPaperNum(paperNum);        return computerOfJudeList;    }

最新文章

123

最新摄影

闪念基因

微信扫一扫

第七城市微信公众平台