Results 1 to 4 of 4

Thread: @Aspects not being detected

  1. #1
    Join Date
    Mar 2008
    Posts
    3

    Default @Aspects not being detected

    I am using Spring 2.5.4, Spring IDE 2.0.4, and Eclipse 3.2.1. So far I have only been able have the IDE detect advice when configured using the aop namespace in one of my spring config XMLs. When applying the same advice using aspectj style annotations (@Aspect, @Before, etc) it will not detect them. I tried adding a component scan for the aspectj annotation per an older thread but had no success with it either.

    Does the IDE support AspectJ style AOP annotations? If so, is there a sample project or instructions for any special steps to make it work?

    Thanks,

    John

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

    Default

    John,

    do you have a bean definition that uses the @Aspect class as bean class. Furthermore you need to have the <aop:aspectj-autoproxy> element in the configuration.

    Let me know if you have those configuration in place.

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

  3. #3
    Join Date
    Mar 2008
    Posts
    3

    Default

    I have both of those defined. However, my context is constructed from several config xml's. I have linked all these together as a config set in the IDE.

    What I discovered is that although <aop:aspectj-autoproxy/> is only required in one of them in order to enable the AspectJAwareAdvisorAutoProxyCreator for the entire context, this tag must be present in each config xml in order for the Spring IDE to pick up the annotated @Aspects defined as beans in that config xml.

    Is this the intended behavior or should the scope of the IDE match that of the context at runtime?

    John

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

    Default

    John,

    that is not intended behavior. Can you please raise a JIRA for this.

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

Posting Permissions

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