读书人

spring使用动态署理面向切面编程(AOP)

发布时间: 2013-09-17 13:35:59 作者: rapoo

spring使用动态代理面向切面编程(AOP) xml

package com.test.aop;import org.aspectj.lang.ProceedingJoinPoint;public class MyInterceptor3 {public void beforeMethod() {System.out.println("MyInterceptor3 before mothod!");}public void afterReturningMethod() {System.out.println("MyInterceptor3 afterReturning mothod!");}public void afterThrowingMethod() {System.out.println("MyInterceptor3 afterThrowing mothod!");}public void aroundMethod(ProceedingJoinPoint pjp) throws Throwable {System.out.println("MyInterceptor3 around start mothod!");pjp.proceed();System.out.println("MyInterceptor3 around end mothod!");}}

?

读书人网 >编程

热点推荐