diff --git a/core/dao/src/main/java/gallerymine/backend/data/OptimisticConcurrencyControlAspect.java b/core/dao/src/main/java/gallerymine/backend/data/OptimisticConcurrencyControlAspect.java index 934ed53..a06c973 100644 --- a/core/dao/src/main/java/gallerymine/backend/data/OptimisticConcurrencyControlAspect.java +++ b/core/dao/src/main/java/gallerymine/backend/data/OptimisticConcurrencyControlAspect.java @@ -4,16 +4,19 @@ import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.annotation.Pointcut; import org.aspectj.lang.reflect.MethodSignature; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.core.annotation.AnnotationUtils; +import org.springframework.stereotype.Component; import org.springframework.util.Assert; import java.lang.reflect.Method; import java.util.Arrays; @Aspect +@Component public class OptimisticConcurrencyControlAspect { private static final Logger LOGGER = LoggerFactory.getLogger(OptimisticConcurrencyControlAspect.class); @@ -24,6 +27,9 @@ public Object retry(ProceedingJoinPoint pjp) throws Throwable { return (retryAnnotation != null) ? proceed(pjp, retryAnnotation) : proceed(pjp); } +// @Pointcut("execution(public * *(..))")// the pointcut expression +// private void anyOldTransfer() {} + private Object proceed(ProceedingJoinPoint pjp) throws Throwable { return pjp.proceed(); }