1.注释解决跨域问题
@CrossOrigin(origins = “*”,maxAge=3600)
@RequestMapping(value = “save”,method = RequestMethod.POST)
@ResponseBody
public String save(@RequestBody XfExamDataconfigTpFixed xfExamDataconfigTpFixed) {
xfExamDataconfigTpFixedService.save(xfExamDataconfigTpFixed);
return “success”;
}
@CrossOrigin(origins = “*”,maxAge=3600)用于解决跨域问题,二用这个注解的时候一定要加method = RequestMethod.POST
2.跨域问题解决方案详解