본문 바로가기

Spring

org.apache.ibatis.executor.ExecutorException : No constructor found in ~ 에러 해결

상황

org.mybatis.spring.MyBatisSystemException:nested exception is org.apache.ibatis.executor.ExecutorException : No constructor found in ~

해결

디폴트 생성자가 없어서 생기는 오류

@NoArgsConstructor를 클래스에 붙여주거나

직접 디폴트 생성자를 만들어주면 된다.

public class Car {
	public Car() {} 
}

디폴트 생성자는 위처럼 만들어주면 되며 @NoArgsConstructor는 이 디폴트 생성자를 자동으로 만들어준다.

참고

https://doing7.tistory.com/8