In package com.repository I have :
- Standalone interfaces extending spring data Repository
- Interfaces extending spring data Repository with my own implementation in the same package
- Repository classes implementing my repository interfaces
I would like to measure execution time of all methods from com.repository package (communication with database). But I would like to avoid duplications
now with
@Pointcut("execution(public * com.repository..(..))")
I have some methods logged twice - from interface and from class implementing this interface. I would like either not to log methods from interfaces which have implementing class in the same package, or not to log methods from classes which implement interface from the same package.
How can I express it with pointcut and advice?
My question is a bit related to AspectJ : Issue when combining multiple pointcuts in @Around advice, but it doesn't solve my problem.