zoukankan      html  css  js  c++  java
  • IDEA 添加serialVersionUID 检查

    1
    2

    1. 根据类名、接口名、成员方法及属性等来生成一个64位的哈希字段,例如 private static final long serialVersionUID = XXXL;

      add default serial version ID: 日后需要进行结构调整的就要手动添加,可以进行向下兼容 private static final long serialVersionUID = XXXL;
        Adds a default serial version ID to the selected type
        Use this option to add a user-defined ID in combination with custom serialization code if the type did undergo structural change since its first release.

    2. 采用默认的1L,具体为private static final long serialVersionUID = 1L;

      add generated serial version ID:java 自动根据算法编译自动生成的,一旦修改类 serialVersionUID就变了,就无法反序列化回来。private static final long serialVersionUID = 1L;
        Adds a generated serial version ID to the selected type
        Use this option to add a compiler-generated ID if the type didnot undergo structural change since its first release.

  • 相关阅读:
    17111 Football team
    Train Problem I (HDU 100题纪念)
    迷宫问题
    图形点扫描
    看病要排队(stl)
    水果
    Prime Ring Problem
    N皇后问题
    2^x mod n = 1
    Queuing
  • 原文地址:https://www.cnblogs.com/land-fill/p/13475770.html
Copyright © 2011-2022 走看看