

我也踩过这个坑( 1 )
aop
详细描述
错误截图

源码
编辑于2025-04-21
-
[深圳|结业弟子]PM-韩小何
0现在明白了,需要在相应的配置文件里引入。比如想页面输入数据显示时间,就要在springMVC里面配置好:
<!--使用aspect注解的aop-->
<mvc:annotation-driven/>
<!--使用aspect注解的aop-->
<aop:aspectj-autoproxy/><bean id="AdvicesM" class="com.alibaba.aop.AdvicesM"/>
<aop:config proxy-target-class="true">
<aop:aspect ref="AdvicesM"><!--切面 -->
<aop:pointcut expression="execution(* com.alibaba.controller.StudentController.*(..))" id="pointcut2"/><!-- 切点 -->
<aop:before method="before" pointcut-ref="pointcut2"/><!--连接通知方法与切点 -->
<aop:after method="after" pointcut-ref="pointcut2"/>
</aop:aspect>
</aop:config>编辑于2018-05-11
- 去第 页