当前位置:网站首页>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 
边栏推荐
- Typescript enumeration
- Use special characters to splice strings "+“
- Receive ontrimmemory and other callbacks through componentcallbacks2 and mock the corresponding scenario
- Process control: process waiting (recycling child processes)
- Image data enhancement (translation, rotation, brightness transformation, flipping, adding Gaussian noise, scaling, cropping)
- TypeScript-类型别名
- (the slow download speed of cifar10 in torchvision has been solved) how to download and use torchvision import
- 这几个小工具也太好用了
- Anaconda+tensorflow most effective summary version (blood and tears summary of 6 reloads)
- TypeScript-键盘映射
猜你喜欢

Bladed入门教程(视频)

Introduction to guava cache usage

torch. Var (), sample variance, parent variance

SylixOS SD设备驱动开发

Magnifying mirror rendering

Scrape captures 51job Recruitment Information (static page)

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

2022.6.7 special student simulation

Bladed入門教程(視頻)

用 Keras/TensorFlow 2.9 创建深度学习模型的方法总结
随机推荐
避免list的并发修改异常的几种方式
Anaconda+tensorflow most effective summary version (blood and tears summary of 6 reloads)
Typescript recognizable Union
Use special characters to splice strings "+“
Uniapp turn off / on / adjust system sound
Node error report sorting
Space geometry
TypeScripy-类的基本使用
Summary of embedded software interview questions
Opencv for face recognition
C. Manipulating History(贪心/哈希/思维/好题)
860. lemonade change
How to start participating in the open source community
TypeScript-键盘映射
Sign in system design: how to draw the sign in function
【1】 Integrated learning: quickly understand Integrated Learning
Uniapp plug-in development
Shell编程笔记
Typescript null and undefined
How to find the complementary sequence of digraph