@Aspect public class Aspect { @Before("execution(* com.test.*.*(..))") public void logBefore(JoinPoint joinPoint) { logEnter..... } @After("execution(* com.test.*.*(..))") public void logAfter(JoinPoint joinPoint) { logExit..... } }
Spring config:
<aop:aspectj-autoproxy/> <bean id="aspect" class="com.test.Aspect"></bean>