http://blinkfox.com/shi-yong-spring-aoplai-tong-ji-fang-fa-de-zhi-xing-shi-jian/
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了http://blinkfox.com/shi-yong-spring-aoplai-tong-ji-fang-fa-de-zhi-xing-shi-jian/相关的知识,希望对你有一定的参考价值。
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...");
- }
以上是关于http://blinkfox.com/shi-yong-spring-aoplai-tong-ji-fang-fa-de-zhi-xing-shi-jian/的主要内容,如果未能解决你的问题,请参考以下文章