AspectJ表达式在切入点错误中提供了形式上的未绑定

编程入门 行业动态 更新时间:2024-10-24 12:20:44
本文介绍了AspectJ表达式在切入点错误中提供了形式上的未绑定的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我在 aspectJ 中包含表达式:

@Pointcut("within(com.param.cpms.dao.impl.ProjectMetaDaoImpl)") public void daoExceptionHandle() { }

在 Spring 3.0 启动时,出现以下错误:

At Spring 3.0 startup, I am getting the following error :

nested exception is java.lang.IllegalArgumentException: error at ::0 formal unbound in pointcut

推荐答案

问题可能不在您的切入点中,而是在使用该切入点并使用切入点中不存在的参数的建议中.只需从建议中删除参数(或者将其添加到切入点即可).

Probably the problem is not in your pointcut, but in an advice using that pointcut and using a parameter which does not exist in the pointcut. Just remove the parameter from the advice (well, or add it to the pointcut).

更多推荐

AspectJ表达式在切入点错误中提供了形式上的未绑定

本文发布于:2023-10-28 18:24:30,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1537416.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:切入点   表达式   绑定   形式上   错误

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!