@EqualsAndHashCode(callSuper = true)注解讲解-CSDN博客
@EqualsAndHashCode(callSuper = true)是Lombok注解之一,用于自动生成equals(Object other)和hashCode()方法。
当我们使用该注解时,Lombok会自动为我们生成equals(Object other)和hashCode()方法的实现代码。其中,callSuper属性设置为true表示要调用父类的equals和hashCode方法,以确保在多层继承结构中也能正确比较对象的相等性。
原文链接:https://blog.csdn.net/weixin_44060488/article/details/135362156