开发者

Conditionally Apply an Interceptor in Spring

How can I conditionally add myOtherInterceptor below?

<bean id="myService" class="org.springframework.aop.framework.ProxyFactoryBean">
   <property name="proxyInterfaces"><value>IMyService</value></property>
   <property name="target">
      <bean parent="baseServiceTarget" class="MyService" />
   </property>
   <property name="interceptorNames">
      <list>
         <value>myInterceptor</value>
         <value开发者_开发百科>myOtherInterceptor</value>
      </list>
   </property>
</bean>


You can have the condition within the interceptor.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜