我在写接口的时候用了@PostMapping(name = "")。指定PostMapping的name属性会让我的静态资源/static/没办法访问。有没有知道这是为什么呀。
@CrossOrigin
@PostMapping(value = "api/upLoad")
// TODO @PostMapping(name = "api/upLoad") name属性会导致静态资源没办法访问
@ResponseBody
public Result upLoad(@RequestParam("file")MultipartFile file) {
错误提示:Whitelabel Error Page
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