HTTP 상태 500 – 내부 서버 오류 타입 예외 보고 메시지 Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException: Parameter 'boardSeq' not found. Available parameters are [arg1, arg0, param1, param2] 설명 서버가, 해당 요청을 충족시키지 못하게 하는 예기치 않은 조건을 맞닥뜨렸습니다.
게시글 삭제기능을 구현하던 중 위와 같은 에러가 떴다.
컨트롤러, 서비스에는 파라미터가 잘 넘어갔는데 NoticeRepository (매퍼인터페이스) 에서
boardSeq가 인식이 안되어서 발생한 문제였다.
public int boardAttachDelete(@Param("boardSeq")Integer boardSeq, @Param("boardTypeSeq")Integer boardTypeSeq);
public int boardDelete(@Param("boardSeq")Integer boardSeq, @Param("boardTypeSeq")Integer boardTypeSeq);
다음과 같이 매개변수 앞에 @Param 애너테이션을 붙여줌으로써 변수를 찾지 못하는 문제를 해결했다
| 필터가 두 번 호출된 이유 (1) | 2024.06.05 |
|---|---|
| (JavaScript) addComment 함수가 작동하지 않았던 이유 (1) | 2024.05.22 |
| 파일첨부시 파일이 안넘어왔던 이유가 뭘까? (1) | 2024.05.20 |
| DateFormat 작성 시 주의할 점 (1) | 2024.05.14 |
| NumberFormatException이 왜 발생했는가? (0) | 2024.05.13 |