当前位置: 代码迷 >> 综合 >> Generating equals/hashCode implementation but without a call to superclass, even though this class
  详细解决方案

Generating equals/hashCode implementation but without a call to superclass, even though this class

热度:61   发布时间:2023-12-28 04:16:03.0

实体类中加入
@Data
后编译出现警告

java: Generating equals/hashCode implementation but without a call to superclass, even though this class does not extend java.lang.Object. If this is intentional, add '@EqualsAndHashCode(callSuper=false)' to your type.

解决方法:
在实体类中加入

@EqualsAndHashCode(callSuper=false)

  相关解决方案