当前位置:网站首页>Entity class conversion cannot be reassigned
Entity class conversion cannot be reassigned
2022-06-11 08:17:00 【Want Xiaoxin】
When calling other projects, it is found that the field of the accepting entity class is null
The reason is that the entity class being converted is set 
lombok Of set Method defaults to uppercase , After the method shown in the figure is set, only set
or get A lowercase letter .
Solution 1
Manual switching , Under an entity class conversion interface , Write a conversion method to call .
But because , The company's project is automatically converted. You only need to write out the source entity class and the receiving entity class 
use gradle Conduct build Then the method can be generated automatically . But this conversion method can not solve the problem . So write the method application under this interface defulat Custom method , You can write your own code without automatic generation 
Solution 2
Check the data and find that there is a kind of @Mapping Advanced usage of 
You can use the automatic conversion of the project , The application concept is similar to Mybatis The specified db Conversion between fields and objects .
But then there was another problem , This method can only convert classes , Can't turn List.
So write another one for List Can be called 
边栏推荐
- Collation of open source modulation identification data set
- ConstraintLayout中使用Guideline限制控件最大宽度
- JS learning basics document Write write a line of text in the page
- Shell Programming Notes
- Summary of force deduction questions
- SOCKET【5】- struct linger 用法
- Typescript header file usage details
- Solve ('You must install pydot (`pip install pydot`) and install graphviz (see...) '‘ for plot_ model..
- Use special characters to splice strings "+“
- Shell编程笔记
猜你喜欢

Record a murder case caused by ignoring the @suppresslint ("newapi") prompt

(the slow download speed of cifar10 in torchvision has been solved) how to download and use torchvision import

torch. Var (), sample variance, parent variance

Selenium click the floating menu and realize the functions of right mouse button

2022.6.6 extra long growth simulation

空间几何

Anaconda+tensorflow most effective summary version (blood and tears summary of 6 reloads)

Node error report sorting

使用 COCO 数据集训练 YOLOv4-CSP 模型

Solve notimplementederror: layer XX has arguments in`__ init__` and therefore must override `get_ config`
随机推荐
DAMENG 用户管理
Collation of basic knowledge of intermediate development of Andrews (for interview)
2022.6.7 special student simulation
Solve cannot import name 'multiheadattention' from 'tensorflow keras. layers‘
How to make hyperlinks in RichTextBox- How can I make a hyperlink work in a RichTextBox?
Database connection pool and bdutils tool
学习《缠解论语》
Planning tasks for continuous automated testing
Label the mask image not obtained through labelme
Typescript unknown type
Typescript type alias
TypeScript-类型保护
(the slow download speed of cifar10 in torchvision has been solved) how to download and use torchvision import
Alchemy experience (model training of deep learning) the necessity of timely adjusting training parameters for some situations (the adjustment of learning rate LR is the primary) summarizes some metho
Use of Excel to XML tool of TestLink
TypeScript-可辨识联合
Selenium click the floating menu and realize the functions of right mouse button
How to find the complementary sequence of digraph
bat 批处理单独环境打包
Method summary of creating deep learning model with keras/tensorflow 2.9