Header

  1. View current page

    정상혁의 수첩

Profile_img_60x60_08
195

Spring AOP

Advisor = Advice + PointCut

 

Advice

 

스프링에서 지원하는 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

Automatic Proxying 사용 예제

Spring이 제공하는 AutoProxyCreator

 

AOP with POJO

public Object logging(ProceedingJoinPoint jp)

ProceedingJoinPoint

.proceed()

.getSignature()

 

 

설명자료

Spring 프레임워크 AOP

Spring AOP: Spring을 이용한 Aspect 지향적인 프로그래밍

Spring AOP in Depth

Programmatically AOP Manipulation

@Configurable 사용해야 하는 이유

스프링에서 지원하는 Advice의 종류

Using AOP for Recoverable Exception.

4. @AspectJ 사용하는 초간단 AOP 예제

Spring AOP의 로깅과 성능 측정용 Interceptor

Spring 프레임워크 워크북 3장 3강 - Spring AOP

스프링 AOP 선택, 활용, 이슈 - 발표자료 & 소스코드

InsideSpring (2) AutoProxyCreator는 Pointcut의 ClassFilter만 사용하지 않는다

[Spring 기본 다지기 1] Spring과 AOP

 

CGLib

런타임 바이트코드 생성을 통해서 동적으로 생성된 하위클래스가 메서드를 오버라이드..

AOP Benchmark

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)

You must log in to leave a comment. Please sign in.