当前位置:网站首页>对象的序列化
对象的序列化
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序列化
边栏推荐
- PMP考生,请查收7月PMP考试注意事项
- 3dsmax snaps to frozen objects
- A complete attack chain
- Dotween usage records ----- appendinterval, appendcallback
- [轉]: OSGI規範 深入淺出
- Pause and resume of cocos2dx Lua scenario
- Use the command character to close the keyboard command of the notebook
- Optimization scheme of win10 virtual machine cluster
- 支持多模多态 GBase 8c数据库持续创新重磅升级
- Recherche de mots pour leetcode (solution rétrospective)
猜你喜欢
Unity ugui source code graphic
win10虚拟机集群优化方案
Learning notes of "hands on learning in depth"
Reverse one-way linked list of interview questions
Use of snippets in vscode (code template)
stm32Cubemx(8):RTC和RTC唤醒中断
[转]MySQL操作实战(三):表联结
小程序直播+電商,想做新零售電商就用它吧!
UE4/UE5 虚幻引擎,材质篇(三),不同距离的材质优化
How to choose a panoramic camera that suits you?
随机推荐
Detailed explanation of the ranking of the best universities
MD5 bypass
MySQL audit log Archive
C4D simple cloth (version above R21)
Cocos2dx screen adaptation
Merge sort
Optimization scheme of win10 virtual machine cluster
UE fantasy engine, project structure
Development error notes
Use of snippets in vscode (code template)
Basic knowledge points of dictionary
LeetCode之单词搜索(回溯法求解)
Sixth note
JVM call not used once in ten years
Vs2015 secret key
被舆论盯上的蔚来,何时再次“起高楼”?
PMP考试敏捷占比有多少?解疑
2022/7/1 learning summary
Panel panel of UI
GBase数据库助力湾区数字金融发展