在springboot项目测试时,后端明明可以正常工作返回数据。而前端出现“Failed to load resource: the server responded with a status of 404 () index.js:22 error:Error: Request failed with status code 404”
该问题的处理方法是,在后端控制器类中“@Controller”没有改成“@RestController”,导致返回的数据无法转化,前端仍然认为后端返回的是页面