aop的xml文件配置

<aop:aspectj-autoproxy proxy-target-class="true"/>


proxy-target-class="true" 与proxy-target-class="false"的区别:
        proxy-target-class属性值决定是基于接口的还是基于类的代理被创建。如果proxy-target-class 属性值被设置为true,那么基于类的代理将起作用(这时需要cglib库)。如果proxy-target-class属值被设置为false或者这个属性被省略,那么标准的JDK 基于接口的代理

猜你喜欢

转载自blog.csdn.net/lh376152/article/details/75305010
今日推荐