반응형
mapstruct + lombok 같이 사용하기 위해서는
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct</artifactId>
<version>1.4.2.Final</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>11</source> <!-- depending on your project -->
<target>11</target> <!-- depending on your project -->
<annotationProcessorPaths>
<path>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>1.4.2.Final</version>
</path>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.22</version>
</path>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok-mapstruct-binding</artifactId>
<version>0.2.0</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
lombok-mapstruct-binding 설정을 해줘야 한다.
반응형
'Java' 카테고리의 다른 글
restapi @dateformat (1) | 2022.11.24 |
---|---|
tomcat8 cookie 관련 (0) | 2022.05.06 |
maven resource plugin , org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources) on project homepage: Input length = 1 (0) | 2021.10.07 |
Log4j && Sl4j (0) | 2021.07.05 |
spring.jpa.hibernate.ddl-auto, jpa ddl 생성전략 (0) | 2021.07.05 |