IntelliJ IDEA“无法解决方法”在方面定义的方法上 [英] IntelliJ IDEA "Cannot resolve method" on aspect-defined method

查看:967
本文介绍了IntelliJ IDEA“无法解决方法”在方面定义的方法上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用



在AspectJ-facet配置中,配置了aspect-path 。



插件AspectJ支持和Spring AOP / @ AspectJ已安装并处于活动状态。





我想在编辑器中使用spring-(data-)方面,任何建议, IntelliJ编辑器如何知道apsect?

解决方案

有很多为IDEA打开与AspectJ相关的门票。他们很久没有得到解决了。我喜欢IDEA,但是当涉及到AspectJ支持时,Eclipse是优越的,可能是因为AspectJ是一个Eclipse项目。因此,每当我处理AspectJ时,我通常都会使用Eclipse,就像我想在我最喜欢的IDE IntelliJ IDEA中做的一样。


I am using spring-data-neo4j 3.4.2, which is (optionally) using AspectJ.

My IDE is IntelliJ IDEA 16 (EAP, IU-144.3891.8). I have had the same problem using latest IntelliJ IDEA 15.

Everything works fine so far within IntelliJ, I can compile, run my Unit-Tests, deploy and run my web-application to/on Wildfly and so on.

When building my project in IntelliJ, I can see usage of the required aspects (the following warning is ok).

org.springframework.data.neo4j.aspects.support.node.Neo4jNodeBacking has not been applied [Xlint:adviceDidNotMatch]
...

My problem: IntelliJ IDEA uses the spring-aspects/ajc correctly. But in the editor, the aspects are not resolved/used. Code-completion etc. does not work.

At AspectJ-facet configuration, aspect-path is configured as suggested.

.

Plugins "AspectJ Support" and "Spring AOP/@AspectJ" are installed and active.

I would like to use the spring-(data-)aspects in my editor, any suggestions, how IntelliJ Editor can get aware of the apsects?

解决方案

There are a lot of open AspectJ-related tickets for IDEA. They have not been resolved for a long time. I love IDEA, but when it comes to AspectJ support Eclipse is superior, probably because AspectJ is an Eclipse project. So whenever I am dealing with AspectJ, I normally use Eclipse, as much as I would like to do everything in my favourite IDE IntelliJ IDEA.

这篇关于IntelliJ IDEA“无法解决方法”在方面定义的方法上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆