6.4.6 "Global" advisor 사용

인터셉터 이름에 별표를 추가하면 별표 앞에있는 부분과 일치하는 bean 이름을 가진 모든 advisor가 advisor 체인에 추가됩니다. 이것은 "Global" advisor의 표준 세트를 추가해야하는 경우에 유용 할 수 있습니다. 다음 예제에서는 두 개의 글로벌 advisor를 정의합니다.

<bean id="proxy" class="org.springframework.aop.framework.ProxyFactoryBean">
    <property name="target" ref="service"/>
    <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"/>

Last updated