当前位置:网站首页>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
边栏推荐
猜你喜欢
随机推荐
AF-DNAT
DC-3靶场搭建及渗透实战详细过程(DC靶场系列)
MATLAB(5)绘图
移植RT-Thread编译报错thumb conditional instruction should be in IT block
Redis-Redisson介绍和用途
【 original 】 Auto. Js the get and post case
Summary of some questions about the grain mall
DC-4靶场搭建及渗透实战详细过程(DC靶场系列)
金仓数据库 OCCI 迁移指南(5. 程序开发示例)
【leetcode热题Hot100】——任务调度器
Dynamically modify the title of the navigation bar in uniapp
SkiaSharp 之 WPF 自绘 五环弹动球(案例版)
Shell编程的条件语句
22 ES6 knowledge points
(2022牛客多校五)G-KFC Crazy Thursday(二分+哈希)
Jincang Database OCCI Migration Guide (5. Program Development Example)
基于flowable的upp(统一流程平台)运行性能优化(3)
高等代数_证明_矩阵乘以自身的转置的特征值不小于0
浅谈用KUSTO查询语言(KQL)在Azure Synapse Analytics(Azure SQL DW)审计某DB账号的操作记录
【STM32】入门(四):外部中断-按键通过中断动作









