【发布时间】:2017-01-04 20:56:48
【问题描述】:
我有这个 AOP 可以在我的所有应用程序方法上运行,但我希望它只在带有 ProfileExecution 注释的方法上运行, 我该如何使用这个 xml
<bean id="profiler" class="com.mytest.ProfilerExecution" />
<aop:config>
<aop:aspect ref="profiler">
<aop:pointcut id="serviceMethod"
expression="execution(public * *(..))" />
<aop:around pointcut-ref="serviceMethod" method="profile"/>
</aop:aspect>
</aop:config>
谢谢
【问题讨论】:
标签: spring-aop spring-annotations