🌳 에러 코드
2023-04-15 00:48:00,501 DEBUG [org.springframework.web.servlet.DispatcherServlet] Completed 405 METHOD_NOT_ALLOWED
2023-04-15 00:48:00,501 DEBUG [org.springframework.web.servlet.DispatcherServlet] "ERROR" dispatch for POST "/error", parameters={}
2023-04-15 00:48:00,502 DEBUG [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping] Mapped to org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController#error(HttpServletRequest)
2023-04-15 00:48:00,503 DEBUG [org.springframework.web.servlet.mvc.method.annotation.HttpEntityMethodProcessor] Using 'application/json', given [*/*] and supported [application/json, application/*+json]
2023-04-15 00:48:00,504 DEBUG [org.springframework.web.servlet.mvc.method.annotation.HttpEntityMethodProcessor] Writing [{timestamp=Sat Apr 15 00:48:00 KST 2023, status=405, error=Method Not Allowed, trace=org.springframe (truncated)...]
2023-04-15 00:48:00,506 DEBUG [org.springframework.web.servlet.DispatcherServlet] Exiting from "ERROR" dispatch, status 405
2023-04-15 00:48:03,660 DEBUG [org.springframework.web.servlet.DispatcherServlet] GET "/static/css/style.css", parameters={}
2023-04-15 00:48:03,661 DEBUG [org.springframework.web.servlet.handler.SimpleUrlHandlerMapping] Mapped to ResourceHttpRequestHandler [classpath [META-INF/resources/], classpath [resources/], classpath [static/], classpath [public/], ServletContext [/]]
2023-04-15 00:48:03,663 DEBUG [org.springframework.web.servlet.DispatcherServlet] Completed 200 OK
🌳 해결 방법
🌾 원인 : AJAX + form 태그 활용부분 - 버튼을 클릭하면 작동하는 함수에 this를 써서 속성을 변수에 정하려고 했다.
🌾 해결 방법 : 버튼을 클릭하면 작동하는 함수이기에, this를 쓰면 버튼이 작동되는 것이므로, form태그 아이디로 바꿔줘서 속성을 변수에 작동하게 해야 한다.
<전>
<후>
'코딩 에러 및 질문' 카테고리의 다른 글
java.lang.NumberFormatException: For input string: "comment" (0) | 2023.04.20 |
---|---|
org.springframework.web.multipart.MultipartException: Current request is not a multipart request (0) | 2023.04.18 |
org.apache.ibatis.exceptions.TooManyResultsException: (0) | 2023.04.14 |
에러 - java.sql.SQLSyntaxErrorException (0) | 2023.04.07 |
에러 - ClassNotFoundException (0) | 2023.04.07 |