Spring之AOP XML方式

xml方式和Annotation方式差不多,只需改动代理类,和配置文件即可。


applicationContext.xml


测试类


两种方式效果是一样的

你可能感兴趣的:(spring)