
목차
1. ModelMapper
dependency 추가
gradle
implementation group: 'org.modelmapper', name: 'modelmapper', version: '2.3.8'
maven
<dependency>
<groupId>org.modelmapper</groupId>
<artifactId>modelmapper</artifactId>
<version>2.3.8</version>
</dependency>
사용 방법
ModelMapper model = new ModelMapper();
Employee employee = model.map(employeeDto, Employee.class);
참고사이트
https://squirmm.tistory.com/entry/Spring-modelMapper
[Spring/Java] modelMapper
1. modelMapper 란? "서로 다른 클래스의 값을 한 번에 복사하게 도와주는 라이브러리" 어떤 Object(Source Object)에 있는 필드 값들을 자동으로 원하는 Object(Destination Object)에 Mapping 시켜주는 라이브러리
squirmm.tistory.com
https://mapstruct.org/documentation/stable/reference/html/#mapping-with-builders
MapStruct 1.5.5.Final Reference Guide
If set to true, MapStruct in which MapStruct logs its major decisions. Note, at the moment of writing in Maven, also showWarnings needs to be added due to a problem in the maven-compiler-plugin configuration.
mapstruct.org
반복적인 DTO 변환 작업을 한 번에 정의! MapStruct 기본 정리
MapStruct 1.4.2.Final Reference Guide를 기준으로 작성되었습니다. Introduction MapStruct는 객체의 타입 변환 시에 유용하게 사용할 수 있는 라이브러리이다. 어노테이션 기반으로 작성되며 Bean으로 등록할
ykh6242.tistory.com
'공부하면서 > spring boot' 카테고리의 다른 글
| [Spring Boot / Batch] 배치 프로그램 공부 (0) | 2026.01.18 |
|---|---|
| [Spring Boot / Batch] 2년만에 다시 봄이 왔다. Spring Boot 로 배치 프로그램 만들기 (1) | 2026.01.16 |
| [Spring Boot / JPA] Gradle plugin 에러 (0) | 2024.02.09 |
| [Spring Boot/JPA] JPA 책 추천, intelliJ, vscode로 프로젝트 만들기 (1) | 2024.02.06 |
| [Spring Boot] STS4 설치하기 (2) | 2024.01.11 |