天天看點

Spring學習筆記(四)Spring配置檔案方式實作AOP

<aop:config>  
        <aop:aspect id="security" ref="securityHandler">  
            <aop:pointcut id="piontcutMethod" expression="execution(* package.ClassName.*(..)"/>  
            <aop:before method="doCheck" pointcut-ref="piontcutMethod"/>  
        </aop:aspect>  
</aop:config> 
           

實作方式與注解方式類似,隻是各種通知以及攔截表達式是在配置檔案中配置;

繼續閱讀