mybatis 오류 / attempted to return null from a method with a primitive return type (int)
mybatis를 통하여 data의 존재 유무를, count를 통해 반환하도록 작성하였다. 그랬더니 다음과 같은 오류가 발생하는 것을 확인하였다. 원문 : attempted to return null from a method with a primitive return type (int). 번역 : 원시 반환 형식(int)을 사용하여 메서드에서 null을 반환하려고 했습니다. 말 그대로, null 값을 처리할 수 없는 int type에 null 값(혹은 공백)이 들어간다는 오류이다. 해결 방법은 간단하다. return 되는 과정을 int 에서 Integer로 치환만 시켜주면 된다.