Hi,
I've a abstract DaoImpl class with a methodand another @Repository which implements the DaoImpl class. Now I'm creating an aspect asCode:public List<T> matching(Criterion...filters)In STS, it shows an indicator meaning that the point cut applied works on the intended method. But when I run a unit test, the aspect never gets executed. Also if I change the pointcut toCode:@Around("execution(* com.mycompany.myproduct.dao.impl.FieldDefinitionDaoImpl.matching(..))") public Object checkRestrictions(ProceedingJoinPoint point) throws Throwable, the aspect gets executed. I tried with this pointcut which I originally wanted but gave up after lots of trying because the aspect won't execute.Code:@Around("execution(* com.mycompany.myproduct.dao.impl.FieldDefinitionDaoImpl.*(..))") public Object checkRestrictions(ProceedingJoinPoint point) throws Throwable
Please helpCode:@Around("execution(* com.mycompany.myproduct.dao.impl.FieldDefinitionDaoImpl.matching(org.hibernate.criteria.Criterion...)) and args(criterions)") public Object checkRestrictions(ProceedingJoinPoint point, Criterion...criterions) throws Throwable


Reply With Quote