Oracle神諭

            BlogJava :: 首頁(yè) :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
            284 隨筆 :: 9 文章 :: 106 評(píng)論 :: 0 Trackbacks

          今天在看Jbpm的源代碼中,發(fā)現(xiàn)其中的Hibernate中的PO的序列化對(duì)象基本上都有一個(gè)serialVersionUID的一個(gè)私有對(duì)象,就上網(wǎng)查找了一部分資料。
          http://www.javapractices.com/Topic45.cjp
          Guidelines for serialVersionUID : (serialVersionUID的指導(dǎo)綱要)

          • always include it as a field, for example: "private static final long serialVersionUID = 7526472295622776147L; " include this field even in the first version of the class, as a reminder(提示) of its importance
          • do not change the value of this field in future versions, unless you are knowingly(老練地) making changes to the class which will render(使..變成) it incompatible(不相容的) with old serialized objects
          • new versions of Serializable classes may or may not be able to read old serialized objects;  it depends upon the nature of the change; provide a pointer to Sun's guidelines for what constitutes a compatible(兼容地) change, as a convenience to future maintainers
          posted on 2005-09-17 21:15 java世界暢談 閱讀(507) 評(píng)論(0)  編輯  收藏

          只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 宁津县| 花莲市| 静海县| 明星| 蓬溪县| 河间市| 婺源县| 清镇市| 华阴市| 萝北县| 五大连池市| 略阳县| 贵港市| 阿瓦提县| 武山县| 肃北| 峨边| 阳朔县| 双峰县| 吉安县| 行唐县| 应城市| 陵川县| 苍梧县| 手游| 高安市| 蒲城县| 游戏| 修水县| 富川| 阿鲁科尔沁旗| 永寿县| 杭锦后旗| 洛浦县| 绥化市| 灯塔市| 沁阳市| 社旗县| 昌邑市| 厦门市| 襄垣县|