AOP 로깅과 성능측정 Interceptor

출처 : http://whiteship.tistory.com/1099

디버그 인터셉터 :: org.springframework.aop.interceptor.DebugInterceptor

성능 측정 인터셉터 :: org.springframework.aop.interceptor.PerformanceMonitorInterceptor

사용법은 ProxyFactoryBean으로 간단하게 설정하여 사용할 수 있습니다.

< bean id="proxy"
        class="org.springframework.aop.framework.ProxyFactoryBean">
        <property name="target" ref="" />
        <property name="interceptorNames">
            <list>
                <value>global*</value>
            </list>
        </property>
</bean>

<bean id="global_debug"
        class="org.springframework.aop.interceptor.DebugInterceptor" />
<bean id="global_performance"
        class="org.springframework.aop.interceptor.PerformanceMonitorInterceptor" />

<bean id="xstreamMarshaller"            class="com.namo.pt.common.oxm.CustomXStreamMarshaller">
<property name="autodetectAnnotations" value="true" />
</bean>


특정 범위는 안되고 target에 설정한 빈(특정클래스)에서만 확인 가능한 듯 하다.


댓글

이 블로그의 인기 게시물

어쩌다 마주친 spring Error

nginx 설정정리

이클립스에서 톰캣 publish할때 에러