🌳 에러 코드
2023-04-26 12:47:07,894 WARN [org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver] Resolved [org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'POST' is not supported]
2023-04-26 12:47:07,895 DEBUG [org.springframework.web.servlet.DispatcherServlet] Completed 405 METHOD_NOT_ALLOWED
2023-04-26 12:47:07,897 DEBUG [org.springframework.web.servlet.DispatcherServlet] "ERROR" dispatch for POST "/error", parameters={masked}
2023-04-26 12:47:07,899 DEBUG [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping] Mapped to org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController#error(HttpServletRequest)
2023-04-26 12:47:07,920 DEBUG [org.springframework.web.servlet.mvc.method.annotation.HttpEntityMethodProcessor] Using 'application/json', given [*/*] and supported [application/json, application/*+json]
2023-04-26 12:47:07,922 DEBUG [org.springframework.web.servlet.mvc.method.annotation.HttpEntityMethodProcessor] Writing [{timestamp=Wed Apr 26 12:47:07 KST 2023, status=405, error=Method Not Allowed, trace=org.springframe (truncated)...]
2023-04-26 12:47:07,947 DEBUG [org.springframework.web.servlet.DispatcherServlet] Exiting from "ERROR" dispatch, status 405
🌳 해결 방법
🌾 원인 : ajax -type을 잘못 씀.
🌾 해결 방법 : PostRestController에 @DeleteMapping으로 썼으므로, Post -> Delete로 바꿈.
<전>
<후>
'코딩 에러 및 질문' 카테고리의 다른 글
org.apache.ibatis.binding.BindingException: Parameter 'ImagePath' not found (0) | 2023.05.07 |
---|---|
org.apache.ibatis.binding.BindingException: (0) | 2023.04.30 |
맥북 - 이클립스 유용한 단축키 (0) | 2023.04.25 |
java.lang.StringIndexOutOfBoundsException (0) | 2023.04.25 |
java.lang.NumberFormatException: For input string: "comment" (0) | 2023.04.20 |