为什么有的配置xml中没有使用ProxyFactoryBean

来源:6-2 ProxyFactoryBean及相关内容(上)

qq_编辑个性签名_0

2018-12-04 13:51

为什么配置xml中没有使用ProxyFactoryBean,也能使用AOP,这种配置是如何工作的?比如:

<aop:config>
        <aop:pointcut id="loggerCutpoint"
            expression=
            "execution(* com.how2java.service.ProductService.*(..)) "/>
             
        <aop:aspect id="logAspect" ref="loggerAspect">
            <aop:after pointcut-ref="loggerCutpoint" method="log"/>
        </aop:aspect>
  </aop:config>


写回答 关注

1回答

  • 慕沐9439420
    2020-01-16 07:30:30

    一个是xml文件配置<aop:config>来实现aop,一个是通过spring aop api 来实现aop,两种方式。

Spring入门篇

为您带来IOC和AOP的基本概念及用法,为后续高级课程学习打下基础

268772 学习 · 963 问题

查看课程

相似问题