Results 1 to 3 of 3

Thread: STS 2.3.1 - Pointcut malformed

  1. #1

    Unhappy STS 2.3.1 - Pointcut malformed

    Hi all,

    Has anyone noticed the following compile error when using Spring STS 2.3.1:

    Code:
    Pointcut is malformed: error Type referred to is not an annotation type: myAnnotation
    In my app-config file I get the above error although the error wasn't occuring before upgrading to STS 2.3.1

    In terms of my app-config I simply have the following:

    Code:
    <aop:aspectj-autoproxy/>
    <bean id="myAspect" class="mypackage.MyAspect" />
    Then I have the following Aspect class

    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();
    	}
    }
    Then my annotation is as follows:

    Code:
    @Retention(RetentionPolicy.RUNTIME)
    @Target(ElementType.METHOD)
    public @interface MyAnnotation {
    	String actionPerformed();
    }
    After looking through various docs it seems to me that the Pointcut isn't malformed and I am using an annotation.

    Does anyone know if this is a specific STS 2.3.1 error or is my code actually incorrect?

  2. #2
    Join Date
    Aug 2004
    Location
    Duesseldorf, Germany
    Posts
    1,210

    Default

    Hi,

    this issue has been addressed by the recently released STS 2.3.2. Please update by downloading a new version of STS or by updating from the configured update site.

    Regards, Christian
    Christian Dupuis
    SpringSource, a division of VMware
    Lead, SpringSource Tools Team
    http://www.springsource.com
    http://twitter.com/cdupuis

  3. #3

    Default Thanks

    Hi Christian,

    Thank you for the reply I shall take a look at the update now.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •