当前位置:网站首页>Record some bugs encountered - when mapstruct and lombok are used at the same time, the problem of data loss when converting entity classes
Record some bugs encountered - when mapstruct and lombok are used at the same time, the problem of data loss when converting entity classes
2022-08-03 04:05:00 【Ye Buxiu 233】
Record some bugs encountered - when mapstruct and lombok are used at the same time, the problem of data loss when converting entity classes
I. Questions
When using mapstruct to convert the entity class, it is found that the converted po class data is all null. Looking at the compiled class file, it is found that the target po class object that should be converted has not been converted, but a new object has been created without givingits attribute assignment
II. Reasons and Solutions

That's why it's a stupid lombok again
The set get method automatically generated by lombok is different from the one generated by the idea tool.
Manually write down the set get method of the po class
Recompile after clean, and the converted dataOK, as shown
边栏推荐
猜你喜欢

这个困扰程序员50年的问题,终于要被解决了?

中原银行实时风控体系建设实践

视频中场的概念(1080I和1080P)和BT601/656/709/1120/2020/2077
DMA 的工作方式

DC-4靶场搭建及渗透实战详细过程(DC靶场系列)

数商云供应链集成系统开发方案:多行业集成平台管理自动化

Auto.js Pro write the first script hello world

Problems that need to be solved for interrupting the system

基于 jetpack compose,使用MVI架构+自定义布局实现的康威生命游戏

MySQL【约束】
随机推荐
js Fetch返回数据res.json()报错问题
DMA 的工作方式
工程制图第九章作业
【剑指offer】——16.数值的整数次方
第三方支付--分账对接
网工知识角|华为网络工程师,华为、华三、思科设备三层交换机如何使用三层接口?命令敲起来
正则表达式绕过
log4j设置日志的时区
Base64编码原理
积分商城可设置的四种兑换商品类型
自考六级雅思托福备战之路
【leetcode热题Hot100】——LRU缓存
浅谈用KUSTO查询语言(KQL)在Azure Synapse Analytics(Azure SQL DW)审计某DB账号的操作记录
正则表达式与绕过案例
ESP8266-Arduino编程实例-MAX6675冷端补偿K热电偶数字转换器驱动
高等代数_证明_矩阵乘以自身的转置的特征值不小于0
CyberArk被评为2022年Gartner特权访问管理魔力象限领导者
肖sir__自动化面试题
Jincang Database Pro*C Migration Guide ( 5. Program Development Example)
基于WPF重复造轮子,写一款数据库文档管理工具(一)