Suppose I have an entity class which implements the Serializable interface and now I persisting that serialized object in the database. How JVM find serialVersionUID of the class of the object at the time of deserialization.
When object serialized it's class name and serialVersionUID
stored in stream.
When object deserialized JVM load class by name and compare serialVersionUID
of loaded class with stored value.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.