Spring AOP
Advisor = Advice + PointCut
Advice
MethodInterceptor
MethodBeforeAdvice
AfterReturningAdvice
IntroductionAdvice(AroundAdvice)
ThrowsAdvice
PointCut
JdkRegexpMethodPointcut
예: .*writer.*
Perl5RegexpMethodPointCut
NameMatchMethodPointcut
ComposablePointCut
ControlFlowPointCut
StaticMethodMAtcherPointCut
DynamicMethodMatcherPointCut
AspectJExpressionPointCut
Advisor
DefaultPointcutAdvisor : advice, pointcut 지정
RegexpMethodPointCutAdvisor (pointcut 설정 통합)
ProxyFactory
setTarget, addAdvisor
ProxyFactoryBean
setTartget : 지정될 대상
setInterceptorNames : advisor나 advice 지정. advice면 모든 joinpoint에 적용됨.
AutoProxyCreator
BeanNameAutoProxyCreator
.setBeanNames, .setInterceptorNames
DefaultAdvisorAutoProxyCreator
AOP with POJO
public Object logging(ProceedingJoinPoint jp)
ProceedingJoinPoint
.proceed()
.getSignature()
설명자료
Spring AOP: Spring을 이용한 Aspect 지향적인 프로그래밍
Programmatically AOP Manipulation
Using AOP for Recoverable Exception.
Spring AOP의 로깅과 성능 측정용 Interceptor
Spring 프레임워크 워크북 3장 3강 - Spring AOP
스프링 AOP 선택, 활용, 이슈 - 발표자료 & 소스코드
InsideSpring (2) AutoProxyCreator는 Pointcut의 ClassFilter만 사용하지 않는다
CGLib
런타임 바이트코드 생성을 통해서 동적으로 생성된 하위클래스가 메서드를 오버라이드..
JDK Dynamic Proxy와 CGLIB Proxy에 대한 이해
Spring aop without java interface
http://tong.nate.com/multiple/37485351
Spring과 AOP의 절묘한 조화 Spring 2.0 AOP
proxyTargetClass 속성이 trued이면 cglib를 씀
http://static.springframework.org/spring/docs/1.2.x/api/org/springframework/aop/framework/ProxyFactoryBean.html#setProxyInterfaces(java.lang.String[])
http://static.springframework.org/spring/docs/2.0.x/reference/aop-api.html#aop-pfb
http://static.springframework.org/spring/docs/2.0.x/reference/aop-api.html#aop-pfb-proxy-types
성능측정
org.springframework.aop.interceptor.JamonPerformanceMonitorInterceptor
Compile time weaving
AnnotationTransactionAspect
History
Last edited on 10/20/2009 17:50 by benelog
Comments (0)