Spring aop配置


面向切面编程,实现了在不影响原来业务的情况下实现对业务功能的添加。 1.在resources目录下的applicationContext.xml文件中,将要添加的功能模块注册好。 ![](https://6markdown.oss-cn-guangzhou.aliyuncs.com/blog/spring-bean.png) 2.使用原生Spring API接口 ![](https://6markdown.oss-cn-guangzhou.aliyuncs.com/blog/aop.png) 3.测试 ![](https://6markdown.oss-cn-guangzhou.aliyuncs.com/blog/测试.png)