본문 바로가기
스프링/스프링

[MyBatis] 오류 해결: org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.executor.ExecutorException: No constructor found in XXX

by 책 읽는 개발자_테드 2021. 8. 20.
반응형

오류 해결:  org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.executor.ExecutorException: No constructor found in XXX

MyBatis가 자동으로 객체를 생성할 때는 기본 생성자(매개변수가 없는)가 필요하다. 기본 생성자가 없다면 위와 같은 에러가 발생한다. 아래와 같이 클래스의 기본 생성자를 추가하면 문제가 해결된다.

public class DrivingInfo {
    public DrivingInfo() {}
}

 

반응형

댓글