[에러해결] IntelliJ | org.springframework.jdbc.BadSqlGrammarException

Hyeongmin Jung·2024년 5월 16일
0

Error

목록 보기
11/13

IntelliJ

  • org.springframework.jdbc.BadSqlGrammarException:
  • ### Error querying database. Cause: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'from board
    where bno = 467' at line 4
  • ### The error may exist in file [\ch4\target\ch4-1.0.0-BUILD-SNAPSHOT\WEB-INF\classes\mapper\boardMapper.xml]
  • ### The error may involve com.fastcampus.ch4.dao.BoardMapper.select-Inline
  • ### The error occurred while setting parameters

✊🏻문제 원인

Cause: java.lang.IllegalArgumentException: Mapped Statements collection already contains value for com.fastcampus.ch4.dao.BoardMapper.select. please check file

mapper에 중복되는 id가 존재하여 에러 발생

✨해결 방법

Mapper에서 중복된 id 제거

0개의 댓글