推荐mapstruct-spring-plus 地址:https://github.com/ZhaoRd/mapstruct-spring-plus 这个项目参考了mapstruct-spring-extensions项目,同时使用APT技术,动态生成Mapper接口,解决编写接口的问题,提供IObejctMapper接口,提供所有的map方法。 maven引入 <properties><org.mapstruct.version>1.4.2.Final</org.mapstruct.version><...
地址:https://github.com/ZhaoRd/mapstruct-spring-plus 这个项目参考了mapstruct-spring-extensions项目,同时使用APT技术,动态生成Mapper接口,解决编写接口的问题,提供IObejctMapper接口,提供所有的map方法。 maven引入 <properties><org.mapstruct.version>1.4.2.Final</org.mapstruct.version><io.github.zhaord.version>...
# 博主技术栈如下 springboot:2.4.5 lombok:1.8.20 mapstruct-plus:1.3.4 knife4j:4.0.0 目录 一、添加依赖(谨防依赖冲突) 二、如果依赖下不下来,要在maven的setting文件中加入腾讯云的镜像 三、 实战测试(将User转成UserDto) 一、添加依赖(谨防依赖冲突) <properties> <java.version>1.8</java.version> <ma...
spring-plus-boot-starter</artifactId> <version>${io.github.zhaord.version}</version> </dependency> </dependencies> ... <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.8.1</version> <configuration> 1.8 <targ...
<dependency><groupId>io.github.zhaord</groupId><artifactId>mapstruct-spring-plus-boot-starter</artifactId><version>1.0.1.RELEASE</version></dependency> 3 示例 3.1 关于依赖 3.1.1 Maven SpringBoot单模块项目:直接在POM文件加入相关依赖即可。
引入mapstruct-plus-spring-boot-starter依赖: <properties><mapstruct-plus.version>1.1.3</mapstruct-plus.version></properties><dependencies><dependency><groupId>io.github.linpeilie</groupId><artifactId>mapstruct-plus-spring-boot-starter</artifactId><version>${mapstruct-plus.version}</version></dependen...
spring-plus-boot-starter</artifactId><version>${io.github.zhaord.version}</version></dependency></dependencies>...<build><plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-compiler-plugin</artifactId><version>3.8.1</version><configuration>1.8<target>1.8</target...
plus-spring-boot-starter</artifactId> <version>${mapstruct-plus.version}</version> </dependency> <dependency> <groupId>io.github.linpeilie</groupId> <artifactId>mapstruct-plus-processor</artifactId> <version>${mapstruct-plus.version}</version> </dependency> <dependency> <groupId>io.github...
compile 'io.github.zhaord:mapstruct-spring-plus-boot-starter:1.0.1.RELEASE' 代码语言:txt 复制 annotationProcessor 'org.mapstruct:mapstruct-processor:1.4.2.Final' 代码语言:txt 复制 testAnnotationProcessor 'org.mapstruct:mapstruct-processor:1.4.2.Final' // if you are using mapstruct in test code ...
<maven.compiler.source>8</maven.compiler.source> <maven.compiler.target>8</maven.compiler.target> </properties> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <...