配置多个切点

<aop:config>
    <aop:aspect id="aspectIntercept" ref="popedomManagerInterceptor">
        <aop:pointcut id="pointCut"
expression="execution(* com.action.userinfoAction..*(..)) and execution(* com.action.memberAction..*(..))&&!execution(* get*(..))&&!execution(* set*(..))" />
         <aop:before method="checkSecurity" pointcut-ref="pointCut" />
     </aop:aspect>
</aop:config>

<bean id="popedomManagerInterceptor" class="com.aop.CmsPopedomManageInterceptor" scope="prototype">
</bean> 
在aop中定义多个切点的时候可以用and等表达式连接

猜你喜欢

转载自lhgyy00.iteye.com/blog/1059442