LoginSignup
32
27

More than 5 years have passed since last update.

IntelliJ IDEAでserialVersionUIDを生成する

Posted at

設定

IntelliJ IDEAのPreference / SettingsからEditor - Inspectionsを選択し、Serialization IssuesSerializable class without 'serialVersionUID'にチェックを入れます。

こんな感じ。
idea_serialversionuid.JPG

serialVersionUIDを生成する

実際にSerializableインタフェースを実装するクラスを作成し、クラス名上でAlt + EnterShow Intention Actionsを表示すると、以下の様にAdd 'serialVersionUID' fieldという選択肢が出てきます。

idea_serialversionuid_gen.jpg

選択すると、(そりゃそうなんだけど) serialVersionUIDのフィールドを作成してくれます。
idea_serialversionuid_generated.jpg

参考

32
27
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
32
27