天天看点

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> 
           

实现方式与注解方式类似,只是各种通知以及拦截表达式是在配置文件中配置;

继续阅读