咲 ⁧!喵⁧‭ 2022-03-26 19:52 采纳率: 50%
浏览 94
已结题

Spring boot中导入静态资源报错405

无论是static目录下的文件,还是导入的jquery(静态过滤的)都无法访问

2022-03-26 19:46:17.556  WARN 9484 --- [p-nio-80-exec-2] o.s.web.servlet.PageNotFound             : Request method 'GET' not supported
2022-03-26 19:46:17.557  WARN 9484 --- [p-nio-80-exec-3] o.s.web.servlet.PageNotFound             : Request method 'GET' not supported
2022-03-26 19:46:17.557  WARN 9484 --- [p-nio-80-exec-3] .w.s.m.s.DefaultHandlerExceptionResolver : Resolved exception caused by Handler execution: org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'GET' not supported
2022-03-26 19:46:17.558  WARN 9484 --- [p-nio-80-exec-2] .w.s.m.s.DefaultHandlerExceptionResolver : Resolved exception caused by Handler execution: org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'GET' not supported

而在浏览器这里:
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.

Sat Mar 26 19:44:42 CST 2022
There was an unexpected error (type=Method Not Allowed, status=405).
Request method 'GET' not supported

img

这种情况怎么解决呢?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    问题事件

    • 系统已结题 4月3日
    • 创建了问题 3月26日