File tree Expand file tree Collapse file tree 3 files changed +18
-8
lines changed
mapstruct-spring-plus-example/src/main/java/io/github/zhaord/mapstruct/plus/basemapper Expand file tree Collapse file tree 3 files changed +18
-8
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ public class Car {
3131
3232<properties >
3333 <org .mapstruct.version>1.4.2.Final</org .mapstruct.version>
34- <io .github.zhaord.version>1.0.0 .RELEASE</io .github.zhaord.version>
34+ <io .github.zhaord.version>1.0.1 .RELEASE</io .github.zhaord.version>
3535</properties >
3636...
3737<dependencies >
@@ -83,13 +83,13 @@ public class Car {
8383dependencies {
8484 ...
8585 compile 'org.mapstruct:mapstruct:1.4.2.Final'
86- compile 'io.github.zhaord:mapstruct-spring-plus-boot-starter:1.0.0 .RELEASE'
86+ compile 'io.github.zhaord:mapstruct-spring-plus-boot-starter:1.0.1 .RELEASE'
8787
8888 annotationProcessor 'org.mapstruct:mapstruct-processor:1.4.2.Final'
8989 testAnnotationProcessor 'org.mapstruct:mapstruct-processor:1.4.2.Final' // if you are using mapstruct in test code
9090
91- annotationProcessor 'io.github.zhaord:mapstruct-spring-plus-processor:1.0.0 .RELEASE'
92- testAnnotationProcessor 'io.github.zhaord:mapstruct-spring-plus-processor:1.0.0 .RELEASE' // if you are using mapstruct in test code
91+ annotationProcessor 'io.github.zhaord:mapstruct-spring-plus-processor:1.0.1 .RELEASE'
92+ testAnnotationProcessor 'io.github.zhaord:mapstruct-spring-plus-processor:1.0.1 .RELEASE' // if you are using mapstruct in test code
9393 ...
9494}
9595```
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ For maven projects, use the following POM file
3131
3232<properties >
3333 <org .mapstruct.version>1.4.2.Final</org .mapstruct.version>
34- <io .github.zhaord.version>1.0.0 .RELEASE</io .github.zhaord.version>
34+ <io .github.zhaord.version>1.0.1 .RELEASE</io .github.zhaord.version>
3535</properties >
3636...
3737<dependencies >
@@ -83,13 +83,13 @@ For Gradle projects, use the following configuration
8383dependencies {
8484 ...
8585 compile 'org.mapstruct:mapstruct:1.4.2.Final'
86- compile 'io.github.zhaord:mapstruct-spring-plus-boot-starter:1.0.0 .RELEASE'
86+ compile 'io.github.zhaord:mapstruct-spring-plus-boot-starter:1.0.1 .RELEASE'
8787
8888 annotationProcessor 'org.mapstruct:mapstruct-processor:1.4.2.Final'
8989 testAnnotationProcessor 'org.mapstruct:mapstruct-processor:1.4.2.Final' // if you are using mapstruct in test code
9090
91- annotationProcessor 'io.github.zhaord:mapstruct-spring-plus-processor:1.0.0 .RELEASE'
92- testAnnotationProcessor 'io.github.zhaord:mapstruct-spring-plus-processor:1.0.0 .RELEASE' // if you are using mapstruct in test code
91+ annotationProcessor 'io.github.zhaord:mapstruct-spring-plus-processor:1.0.1 .RELEASE'
92+ testAnnotationProcessor 'io.github.zhaord:mapstruct-spring-plus-processor:1.0.1 .RELEASE' // if you are using mapstruct in test code
9393 ...
9494}
9595```
Original file line number Diff line number Diff line change 11package io .github .zhaord .mapstruct .plus .basemapper ;
22
3+ import org .mapstruct .InheritInverseConfiguration ;
34import org .mapstruct .Mapper ;
5+ import org .mapstruct .MappingTarget ;
6+ import org .mapstruct .TargetType ;
47
58@ Mapper (componentModel = "spring" )
69public interface CarDtoMapper {
710 Car dtoToEntity (CarDto dto );
11+
12+ @ InheritInverseConfiguration (name = "dtoToEntity" )
13+ CarDto entityToDto (Car dto );
14+
15+ Car dtoMapToEntity (CarDto dto , @ MappingTarget Car car );
16+
17+ CarDto entityMapToDto (Car dto , @ MappingTarget CarDto car );
818}
You can’t perform that action at this time.
0 commit comments