当前位置:网站首页>对象的序列化
对象的序列化
2022-07-05 05:14:00 【qingqing不秃头】
1.什么是序列化和反序列化
简单来说,就是将Java对象转换成二进制流进行传输,反序列化则是将二进制数据流转换成java对象信息的过程.
2.如何实现序列化
只需让实体类去实现Serializable接口即可
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "users",autoResultMap = true)
@ApiModel
public class User implements Serializable {
@TableField(value = "username")
@ApiModelProperty(value = "学号")
private String userName;
@TableId(value="age")
@ApiModelProperty(value = "用户年龄")
private Integer age;
被static修饰的属性不能被序列化
3.序列化方式
jdk默认序列化
存储形式是16进制的字符
JacksonJsonRedisSerializer序列化
边栏推荐
- Judge the position of the monster in the role under unity3d
- Ue4/ue5 illusory engine, material part (III), material optimization at different distances
- GameObject class and transform class of unity
- When will Wei Lai, who has been watched by public opinion, start to "build high-rise buildings" again?
- Heap sort summary
- Django reports an error when connecting to the database. What is the reason
- Cocos2dx screen adaptation
- Research on the value of background repeat of background tiling
- Common database statements in unity
- 2020-10-27
猜你喜欢

Data is stored in the form of table

Embedded database development programming (zero)

Do a small pressure test with JMeter tool

Django reports an error when connecting to the database. What is the reason

669. Prune binary search tree ●●
![[转]: OSGI规范 深入浅出](/img/54/d73a8d3e375dfe430c2eca39617b9c.png)
[转]: OSGI规范 深入浅出

Merge sort

Reverse one-way linked list of interview questions

Grail layout and double wing layout

Generate filled text and pictures
随机推荐
Redis 排查大 key 的4种方法,优化必备
Use the command character to close the keyboard command of the notebook
"Measuring curve length" of CAD dream drawing
【论文笔记】Multi-Goal Reinforcement Learning: Challenging Robotics Environments and Request for Research
A three-dimensional button
Simple modal box
Detailed explanation of the ranking of the best universities
Do a small pressure test with JMeter tool
使用命令符关闭笔记本自带键盘命令
小程序直播+电商,想做新零售电商就用它吧!
Embedded database development programming (V) -- DQL
Kali 2018 full image download
PR first time
2022/7/1學習總結
Basic knowledge points
Insert sort
使用Room数据库报警告: Schema export directory is not provided to the annotation processor so we cannot expor
被舆论盯上的蔚来,何时再次“起高楼”?
AutoCAD - set layer
Generate filled text and pictures