当前位置:网站首页>对象的序列化
对象的序列化
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序列化
边栏推荐
- A three-dimensional button
- 嵌入式数据库开发编程(零)
- Do a small pressure test with JMeter tool
- Collapse of adjacent vertical outer margins
- Es module and commonjs learning notes -- ESM and CJS used in nodejs
- 2022/7/1 learning summary
- UE4/UE5 虚幻引擎,材质篇(三),不同距离的材质优化
- Unity find the coordinates of a point on the circle
- Unity connects to the database
- Chinese notes of unit particle system particle effect
猜你喜欢
Download and use of font icons
Unity3d learning notes
Unity find the coordinates of a point on the circle
C语言杂谈1
[转]: OSGI规范 深入浅出
Ue4/ue5 illusory engine, material part (III), material optimization at different distances
Do a small pressure test with JMeter tool
[turn to] MySQL operation practice (I): Keywords & functions
stm32Cubemx(8):RTC和RTC唤醒中断
How to choose a panoramic camera that suits you?
随机推荐
PostgreSQL surpasses mysql, and the salary of "the best programming language in the world" is low
用 Jmeter 工具做个小型压力测试
Research on the value of background repeat of background tiling
64 horses, 8 tracks, how many times does it take to find the fastest 4 horses at least
JVM call not used once in ten years
Basic knowledge points
Optimization scheme of win10 virtual machine cluster
2022/7/1 learning summary
Unity ugui source code graphic
Create a pyGame window with a blue background
Sqlserver stored procedures pass array parameters
Redis has four methods for checking big keys, which are necessary for optimization
Three dimensional dice realize 3D cool rotation effect (with complete source code) (with animation code)
Reverse one-way linked list of interview questions
被舆论盯上的蔚来,何时再次“起高楼”?
Pause and resume of cocos2dx Lua scenario
Unity parallax infinite scrolling background
Unity writes timetables (without UI)
3dsmax common commands
Development error notes