参数不适用于Java方法

参数不适用于Java方法,java,Java,我的Java web应用程序工作正常,但是我可以在我的Eclipse IDE中经常看到这个错误(在使用IntelliJ时不会出现这个错误): 类型AbstractModule中的方法bindInterceptor(Matcher>、Matcher、MethodInterceptor…)不可用 适用于参数(匹配器, Matcher, ShiroMethodInterceptor)AopModule.java/web/src/main/java/com/myapp/shiro/aop行 41 Jav

我的Java web应用程序工作正常,但是我可以在我的Eclipse IDE中经常看到这个错误(在使用IntelliJ时不会出现这个错误):

类型AbstractModule中的方法bindInterceptor(Matcher>、Matcher、MethodInterceptor…)不可用 适用于参数(匹配器, Matcher, ShiroMethodInterceptor)AopModule.java/web/src/main/java/com/myapp/shiro/aop行 41 Java问题

这个问题的解决方案是什么

更新:


也许我遗漏了什么,但我认为这意味着您正在传递不允许的参数。例如,您正在使用参数
(p1,p2,p3)
调用
bindInterceptor
,其中
(p1 instanceof Matcher>&p2 instanceof Matcher&p3 instanceof MethodInterceptor)==false
我不知道
MethodInterceptor
ShiroMethodInterceptor
类之间的关系,但我想出于某种原因,Eclipse怀疑它们的关系不允许您将
ShiroMethodInterceptor
类型的对象作为
MethodInterceptor
安全地传递。或者我只是不明白这个问题。你能为你的类MethodInterceptor和ShiroMethodInterceptor发布代码吗?@MrD感谢你的分析@Felix问题中更新了类的链接我猜在您的项目或项目路径设置中有多个名为MethodInterceptor的类。尝试在传递参数时显式声明路径(例如:org.apache.shiro.aop.MethodInterceptor MethodInterceptor)。