覆盖equals方法的注意事项
public abstract class AbstractPointcutAdvisor{@Overridepublic boolean equals(Object other) {if (this == other) {return true;}if (!(other instanceof PointcutAdvisor)) {return false;}PointcutAdvisor otherAdvisor = (PointcutAdvisor) other;return (ObjectUtils.nullSafeEquals(getAdvice(), otherAdvisor.getAdvice()) &&ObjectUtils.nullSafeEquals(getPointcut(), otherAdvisor.getPointcut()));}@Overridepublic int hashCode() {return PointcutAdvisor.class.hashCode();}}
other instanceof PointcutAdvisor 要判断一下 类型,可能会有不是该类型的类传入