Hi all,
Has anyone noticed the following compile error when using Spring STS 2.3.1:
In my app-config file I get the above error although the error wasn't occuring before upgrading to STS 2.3.1Code:Pointcut is malformed: error Type referred to is not an annotation type: myAnnotation
In terms of my app-config I simply have the following:
Then I have the following Aspect classCode:<aop:aspectj-autoproxy/> <bean id="myAspect" class="mypackage.MyAspect" />
Then my annotation is as follows:Code:@Aspect public class MyAspect{ @Pointcut(value="execution(public * *(..))") public void anyPublicMethod() { } @Around("anyPublicMethod() && @annotation(myAnnotation)") public Object doSomething(ProceedingJoinPoint pjp, MyAnnotation myAnnotation) throws Throwable { // do stuff.... return pjp.proceed(); } }
After looking through various docs it seems to me that the Pointcut isn't malformed and I am using an annotation.Code:@Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) public @interface MyAnnotation { String actionPerformed(); }
Does anyone know if this is a specific STS 2.3.1 error or is my code actually incorrect?


Reply With Quote
