티스토리 뷰
nested exception is org.apache.ibatis.reflection.ReflectionException: Error instantiating class 객체명 with invalid types () or values (). Cause: java.lang.NoSuchMethodException: 객체명 <init>()
Mybatis에서 객체를 매핑할때 발생하는 에러로 기본생성자가 없으면 발생하는 에러이다.
setter와 AllargsConstructor의 존재와 상관없이 Mybatis에서 조회 후 객체를 매핑할때 빈 생성자를 반드시 만들어줘야한다.
Lombok을 사용중이면 @NoArgsConstructor 설정해주면 된다.
@Builder
@Getter @Setter
@AllArgsConstructor
@NoArgsConstructor
public class 객체명 {
private String ...
}
'개발 > 개발팁' 카테고리의 다른 글
AWS EC2에서 Spring Boot 프로젝트를 Docker Tomcat 배포 시 404 에러가 날 때 대처법 (0) | 2023.02.11 |
---|---|
포스트맨(Postman) Pre-Request Script / Tests로 API 순서대로 자동 요청하기 (0) | 2023.01.27 |
포스트맨(Postman) API 반복 요청하기 (0) | 2023.01.22 |
Windows 10에서 Apache Jmeter 사용하기 (0) | 2023.01.21 |
[Javascript] Object.isEmpty (0) | 2023.01.18 |
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- S3
- AWS
- docker
- MySQL
- chat GPT
- 인프런
- Log
- terraform
- java
- EKS
- elasticsearch
- AWS EC2
- OpenFeign
- serverless
- openAI API
- AOP
- GIT
- 스프링부트
- cache
- springboot
- OpenAI
- Kotlin
- ChatGPT
- 코딩테스트
- JWT
- Elastic cloud
- awskrug
- lambda
- Spring
- 람다
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
글 보관함