配置AOP:pointcut时出现了异常,我是新手,请大家多指教

XingxingZhiHuoGRF 2016-07-01 11:25:01
<aop:aspectj-autoproxy proxy-target-class="true"/>
<aop:config>
<aop:aspect id="TestAspect" ref="aspectTest">
<aop:pointcut expression="excution(* com.service.*.*(..))" id="at"/>
<aop:around method="aspect" pointcut-ref="at"/>
</aop:aspect>
</aop:config>
<bean id="test" class="com.service.impl.TestServiceImpl"></bean>

<bean id="aspectTest" class="com.aspect.AspectTest"></bean>

</beans>

异常信息: Pointcut is not well-formed: expecting ')' at character position 11
excution(* com.service.*.*(..))
...全文
354 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
wei_gege 2018-12-26
  • 打赏
  • 举报
回复
还有就是aspect weaver版本低了,可以试试高版本的jar包
Little_Wu_Wu 2017-09-30
  • 打赏
  • 举报
回复
我也是找了半天,发现和楼主一样的错误,我ri
XingxingZhiHuoGRF 2016-07-01
  • 打赏
  • 举报
回复
知道错误了,execution单词写错了
XingxingZhiHuoGRF 2016-07-01
  • 打赏
  • 举报
回复
引用 4 楼 qnmdcsdn 的回复:
[quote=引用 2 楼 qnmdcsdn 的回复:] 意思是说你这个切面配置的有问题吧,excution(* com.service.*.*(..))
把id去了试试[/quote] 错误提示:pointcut元素中必须包含id
  • 打赏
  • 举报
回复
引用 2 楼 qnmdcsdn 的回复:
意思是说你这个切面配置的有问题吧,excution(* com.service.*.*(..))
把id去了试试
XingxingZhiHuoGRF 2016-07-01
  • 打赏
  • 举报
回复
应该是,但是不知道怎么改
  • 打赏
  • 举报
回复
意思是说你这个切面配置的有问题吧,excution(* com.service.*.*(..))
XingxingZhiHuoGRF 2016-07-01
  • 打赏
  • 举报
回复
网上有人说是在execution后面的第一个*之后有空格,在有空格的情况下还是有这个错误,我使用的是MyEclipse编译器
  • 打赏
  • 举报
回复
引用 6 楼 XingxingZhiHuoGRF 的回复:
知道错误了,execution单词写错了
一脸懵逼

67,513

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧