当前位置:网站首页>对象的序列化
对象的序列化
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序列化
边栏推荐
- Listview pull-down loading function
- Unity connects to the database
- Development error notes
- PMP考生,请查收7月PMP考试注意事项
- Recherche de mots pour leetcode (solution rétrospective)
- PR first time
- Do a small pressure test with JMeter tool
- Ue4/ue5 illusory engine, material part (III), material optimization at different distances
- 2022 / 7 / 1 Résumé de l'étude
- China as resin Market Research and investment forecast report (2022 Edition)
猜你喜欢

How to choose a panoramic camera that suits you?

Learning notes of "hands on learning in depth"

Do a small pressure test with JMeter tool

Ue4/ue5 illusory engine, material part (III), material optimization at different distances

2022/7/2 question summary
![[paper notes] multi goal reinforcement learning: challenging robotics environments and request for research](/img/17/db8614b177f33ee4f67b7d65a8430f.png)
[paper notes] multi goal reinforcement learning: challenging robotics environments and request for research

Magnifying glass effect

Generate filled text and pictures

Web APIs DOM节点

Ue4/ue5 illusory engine, material chapter, texture, compression and memory compression and memory
随机推荐
Unity sends messages and blocks indecent words
PostgreSQL surpasses mysql, and the salary of "the best programming language in the world" is low
2022/7/2 question summary
Unity3d learning notes
Ue4/ue5 illusory engine, material chapter, texture, compression and memory compression and memory
嵌入式数据库开发编程(六)——C API
Listview pull-down loading function
Count sort
[turn]: OSGi specification in simple terms
Ue4/ue5 illusory engine, material part (III), material optimization at different distances
MySQL audit log Archive
Animation
[LeetCode] 整数反转【7】
cocos_ Lua listview loads too much data
Bucket sort
PR first time
Es module and commonjs learning notes
3dsmax scanning function point connection drawing connection line
Chinese notes of unit particle system particle effect
[转]MySQL操作实战(三):表联结