原创

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

温馨提示:
本文最后更新于 2024年10月09日 ,已超过 192 天没有更新。若文章内的图片失效(无法正常加载),请留言反馈或直接联系我

实体类中加入
@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)

正文到此结束
本文目录