@PostMapping(value = "api/upLoad")
// TODO @PostMapping(name = "api/upLoad") name属性会导致静态资源没办法访问
@ResponseBody
public Result upLoad(@RequestParam("file")MultipartFile file) {
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Sun Sep 11 21:09:12 CST 2022
There was an unexpected error (type=Method Not Allowed, status=405).
Request method 'GET' not supported
org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'GET' not supported
可以试下ResquestMapping,或者在配置文件中不拦截静态资源,如有帮助请采纳