Regular expression pointcuts:
when you are using the RegexpMethodPointcut, you need to include the Jakarta Commons ORO 3 library in your application.

<beans>
<bean
class="com.springinaction.chapter03.cleaning.MaidService"/>
<bean com.springinaction.
chapter03.cleaning.QueryInterceptor"/>
<bean
class="org.springframework.aop.support.RegExpPointcutAdvisor">
<property name="pattern">
<value>.*get.+By.+</value>
</property>
<property name="advice">
<ref bean="queryInterceptor"/>
</property>
</bean>

<bean
class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces">
<value>com.springinaction.chapter03.
cleaning.MaidService</value>
</property>
<property name="interceptorNames">
<list>
<value>queryPointcutAdvisor</value>
</list>
</property>
<property name="target">
<value ref="maidServiceTarget">
</property>
</bean>
</beans>

相关文章:

  • 2022-03-10
  • 2022-02-07
  • 2021-11-03
  • 2021-05-18
  • 2022-01-06
  • 2021-09-25
  • 2021-07-29
  • 2022-01-09
猜你喜欢
  • 2021-12-05
  • 2022-02-17
  • 2021-06-20
  • 2022-01-22
  • 2021-06-14
  • 2022-01-06
  • 2021-07-24
相关资源
相似解决方案