spring 拦截器拦截点的配置

mac2022-06-30  85

实用正则org.springframework.aop.support.RegexpMethodPointcutAdvisor

然后

<property name="advice"> <ref local="methodCacheInterceptor"/> </property> <property name="patterns"> <list> <value>.*_cache.*</value> </list> </property>

表示拦截方法命中包含有_cache的方法

.*DAO.   表示dao中的所有方法

转载于:https://www.cnblogs.com/yanjunwu/p/3698208.html

最新回复(0)