Spring compile-time aspects in IDEA Community Edition?
Hi,
I want Spring's @Configurable annotation to work when running tests in intelliJ IDEA, but I have no sucess.
To reproduce, I created a branch on Springs petclinic project:
https://github.com/tkruse/spring-petclinic/tree/entitylistener
You can see from my additional commit:
https://github.com/tkruse/spring-petclinic/commit/c465130cb4daa717e625d8e05a9024f363eeaf45
I do not want to achieve anything compex here, no custom defined aspects, just adding @Configurable to a class created by Hibernate so it gets injected by Spring.
The tests run through with
mvn clean test
Same when invoking the maven test goal inside IDEA.
But when running the tests from the IDEA run menu, the test that requires compile-time weaving fails.
I have added the Aspectj weaver plugin, and checked "AspectJ weaving" in the build menu.
In Settings > Other settings > AspectJ weaver, I checked "Enable weaving" and added this auto-detected aspect in the plugin configuration in settings:
org.springframework.beans.factory.aspectj.AnnotationBeanConfigurerAspect
but none of that helped.
I start to believe that this will only work in Ultimate Edition, because the plugin was last updated for IDEA 12.
thanks,
Thibault
Related links:
https://www.jetbrains.com/idea/help/aspectj.html
https://www.jetbrains.com/idea/help/compiler-java-compiler.html
http://intellij.expertsystems.se/aspectj.html
https://github.com/spring-projects/spring-framework/blob/master/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/AnnotationBeanConfigurerAspect.aj
Please sign in to leave a comment.
Community Edition has no AspectJ/Spring support.