💎 Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:
갑자기 프로젝트를 진행하던 도중 ↑ 같은 오류 메세지가 뜨면서 실행되지 않았다 ..
@Repository
public class AdministratorDAO {
@Autowired
private SqlSessionTemplate sqlSession;
public int getListCount() {
return sqlSession.selectOne("AdministratorMapper.getListCount");
}
public int petCount() {
return sqlSession.selectOne("AdministratorMapper.petCount");
}
public int commonCount() {
return sqlSession.selectOne("AdministratorMapper.commCount");
}
<select id="commonCount" resultType="_int">
SELECT COUNT(*) FROM MEMBER
WHERE SECESSION_FL = 'N'
</select>
📣 해결!!
무엇이문제인지 찾아봤더니 DAO에서 id값을 넘겨줄때 오타가나서 commCount로 보냈고 mapper에서는 commonCount로 적어서 매칭안되서 그런거였다.. 😅😅
💋 코드는 거짓말하지않는다 자나깨나 오타를 조심하자!!