http://blinkfox.com/shi-yong-spring-aoplai-tong-ji-fang-fa-de-zhi-xing-shi-jian/
spring-aop.xml
- @Component
- @Aspect
- public class AspectDef {
- //@Pointcut("execution(* com.test.spring.aop.pointcutexp..JoinPointObjP2.*(..))")
- //@Pointcut("within(com.test.spring.aop.pointcutexp..*)")
- //@Pointcut("this(com.test.spring.aop.pointcutexp.Intf)")
- //@Pointcut("target(com.test.spring.aop.pointcutexp.Intf)")
- //@Pointcut("@within(org.springframework.transaction.annotation.Transactional)")
- //@Pointcut("@annotation(org.springframework.transaction.annotation.Transactional)")
- @Pointcut("args(String)")
- public void pointcut1() {
- }
- @Before(value = "pointcut1()")
- public void beforeAdvice() {
- System.out.println("pointcut1 @Before...");
- }