aop配置文件记录

来源:互联网 发布:轻云4g网络下怎么用 编辑:程序博客网 时间:2024/05/21 14:09

记得加入:

xmlns:aop="http://www.springframework.org/schema/aop

xsi:schemaLocation="http://www.springframework.org/schema/aop
                       http://www.springframework.org/schema/aop/spring-aop.xsd"


aop配置:

 <aop:config proxy-target-class="true">
        <aop:aspect ref="homeAspect">
            <aop:pointcut expression="execution(* com.test.*.dao.*.*(..))"
                id="register" />
            <aop:before method="after" pointcut-ref="register" />
        </aop:aspect>
    </aop:config>

注;aop:pointcut 配置中 * com.test.*.dao.*.*(..)表示dao这个包下面所有类的所有方法

原创粉丝点击