前端控制台报错“ Uncaught SyntaxError: Unexpected token ‘<‘”
后台报错“HttpRequestMethodNotSupportedException: Request method ‘GET‘ not supported”
原因是项目里同时存在了 @RequestMapping 和 @GetMapping
@RequestMapping(name = "/aaaaa",method = RequestMethod.POST)
@GetMapping("/")
###解决:
统一接口注解
把
@RequestMapping(name = "/aaaaa",method = RequestMethod.POST)
改为
@PostMapping("/aaaaa")