Beispiel #1
0
 @Bean
 public Advisor errorHandlingAdvisor() {
   AspectJExpressionPointcut pointcut = new AspectJExpressionPointcut();
   pointcut.setExpression("org.sculptor.examples.boot.config.AopConfig.service()");
   DefaultPointcutAdvisor advisor = new DefaultPointcutAdvisor(pointcut, errorHandlingAdvice());
   advisor.setOrder(3);
   return advisor;
 }
Beispiel #2
0
 @Bean
 public Advisor jpaFlushEagerAdvisor() {
   AspectJExpressionPointcut pointcut = new AspectJExpressionPointcut();
   pointcut.setExpression(
       "org.sculptor.examples.boot.config.AopConfig.service() && !org.sculptor.examples.boot.config.AopConfig.readOnlyMethod()");
   DefaultPointcutAdvisor advisor = new DefaultPointcutAdvisor(pointcut, jpaFlushEagerAdvice());
   advisor.setOrder(4);
   return advisor;
 }
 @Override
 public boolean equals(Object other) {
   if (this == other) {
     return true;
   }
   if (!(other instanceof AspectJExpressionPointcut)) {
     return false;
   }
   AspectJExpressionPointcut otherPc = (AspectJExpressionPointcut) other;
   return ObjectUtils.nullSafeEquals(this.getExpression(), otherPc.getExpression())
       && ObjectUtils.nullSafeEquals(
           this.pointcutDeclarationScope, otherPc.pointcutDeclarationScope)
       && ObjectUtils.nullSafeEquals(this.pointcutParameterNames, otherPc.pointcutParameterNames)
       && ObjectUtils.nullSafeEquals(this.pointcutParameterTypes, otherPc.pointcutParameterTypes);
 }