0

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.

IntelliJ editor error message

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

AspectJ facet configuration.

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

installed aspectj plugin

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

Markus Schulte
  • 3,445
  • 3
  • 43
  • 54

2 Answers2

2

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.

kriegaex
  • 57,516
  • 12
  • 99
  • 168
0

I resolved this issue by adding the following maven dependency. None of solutions worked for me which were given here. Another solution is here.

Maven Dependency:

<!-- https://mvnrepository.com/artifact/org.springframework/spring-aspects -->
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-aspects</artifactId>
        <version>3.2.0.RELEASE</version>
    </dependency>

Hope this fix will help other users too.

Zia Ul Mustafa
  • 381
  • 5
  • 9