2024-08-21 14:41:50 +08:00
..
2024-07-17 15:55:27 +08:00
2024-08-21 14:41:50 +08:00
2024-06-15 17:21:05 +08:00
2023-07-31 11:50:01 +08:00
2024-08-21 14:41:50 +08:00
2024-08-21 14:41:50 +08:00

home, modules, bannerBrand, isShowTitleInHome, actionText, actionLink, features, footer
home modules bannerBrand isShowTitleInHome actionText actionLink features footer
true
BannerBrand
Features
MdContent
Footer
bgImage title description tagline buttons socialLinks
/bg.svg MapStructPlus 可能是最简单最强大的Java Bean转换工具 Mapstruct Plus 是 Mapstruct 的增强工具,在 Mapstruct 的基础上,实现了自动生成 Mapper 接口的功能,并强化了部分功能,使 Java 类型转换更加便捷、优雅。
text link
快速开始 /introduction/quick-start.html
text link type
常见问题 /guide/faq.html plain
icon link
LogoGithub https://github.com/vuepress-reco/vuepress-theme-reco
true About /views/other/about
title icon details
快速 launch Java 类之间的转换,仅需要增加一个注解,减少了乏味且容易出错的开发任务
title icon details
效率 light 基于注解处理器,所有生成工作都在编译期完成
title icon details
转换 change 属性转换基于类中的 getter/setter 方法
title icon details
兼容 any 支持JDK8~17、SpringBoot2~3
title icon details
多类转换 structure 支持单个类配置多个类型转换
title icon details
Map转对象 type 更强大的Map转对象功能
startYear
2023

友情链接

其他开源项目

最新版本

  • maven
<dependency>
    <groupId>io.github.linpeilie</groupId>
    <artifactId>mapstruct-plus-spring-boot-starter</artifactId>
    <version>1.4.4</version>
</dependency>
  • gradle
implementation group: 'io.github.linpeilie', name: 'mapstruct-plus-spring-boot-starter', version: '1.4.4'

更新日志

1.4.4

  • fix: 修复部分Spring版本下找不到类的问题

1.4.3

  • feat: ComponentModel 增加 spring-lazy 可选项,懒加载 Spring Bean解决互相依赖的问题并将默认配置改为该选项
  • fix: 解决 unmappedTargetPolicy 默认配置不生效的问题;
  • enhance: 优化 IDEA 本地开发构建效率,一定程度上缩短构建时间、减小元空间占用;Issue #89

1.4.2

  • feat: AutoMapper 注解增加 mapperNameSuffix 属性,支持配置生成的转换接口名称增加后缀,默认规则下生成的反向转换接口同时生效;
  • feat : 适配 Mapper 注解的 unmappedSourcePolicyunmappedTargetPolicytypeConversionPolicycollectionMappingStrategynullValueMappingStrategynullValueIterableMappingStrategynullValuePropertyMappingStrategynullValueCheckStrategymappingControl 属性;
  • feat : 适配 Mapping 注解的 constantqualifiedBynullValueCheckStrategynullValuePropertyMappingStrategymappingControl
  • feat : 适配 MapStruct 配置的 typeConversionPolicycollectionMappingStrategynullValueIterableMappingStrategynullValueMapMappingStrategynullValueCheckStrategymappingControlunexpectedValueMappingExceptionsuppressTimestampInGenerated 属性;
  • fix : 适配同一个模块中同类不同包生成类名冲突的问题;
  • feat : AutoMapping 注解增加 reverseConvertGenerate,控制是否生成反向转换逻辑,适配更加复杂的应用场景;
  • fix : 修复 targetClass 同时配置父类和子类时,转换规则冲突的问题;
  • fix : 修复不同模块配置类、代理类类名冲突的问题;
  • feat : AutoMapper 增加 useEnums 属性,支持手动配置转换时需要的枚举,解决跨模块枚举无法自动转换的问题;
  • 优化转换接口生成逻辑;

1.4.0

  • 优化复杂对象转换逻辑,占用元空间更小!性能更快!
  • 去除 hutool 等依赖,目前项目中只依赖了 MapStruct
  • 适配对象循环嵌套场景
  • feature#63AutoMappingReverseAutoMapping 支持 qualifiedByNameconditionQualifiedByNamedependsOn 属性
  • issue#I93Z2ZAutoMappings 支持配置在方法上面

升级 1.4.0 注意事项:

  • 1.4.0 及以后的版本,复杂对象比较依赖项目中生成的 ConvertMapperAdapter 在多模块下,由于类加载机制只会加载一个的原因,可能会导致 NoSuchMethodError 的异常, 当然,这个问题在之前也会有,几率可能低一些,所以多模块下,务必配置 adapterPackage 来避免该问题。
  • Map 与对象的转换,还是依赖 hutool 中的类转换实现,如果需要该功能,需要额外引入 hutool-core 依赖包。

……

代码仓库

参与贡献

  • 贡献代码:欢迎提交 Issue 或 Pull Requests
  • 维护文档:项目目录下的 docs 目录,欢迎参与翻译与修订

推荐文章

介绍视频

联系我

个人网站:代码笔耕

微信交流群

微信交流群

vx : Clue8a796d01

Clue8a796d01

公众号:代码笔耕

代码笔耕