开发者

Conditionally Apply an Interceptor in Spring

开发者 https://www.devze.com 2023-02-07 21:39 出处:网络
How can I conditionally add myOtherInterceptor below? <bean id=\"myService\" class=\"org.springframework.aop.framework.ProxyFactoryBean\">

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

精彩评论

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