Hi!

I'm trying to use Spring AOP in a Blossom module I'm developing for evaluation 
of Magnolia.
I'm trying to set it up the usual way like we do in all of our Spring MVC 
projects, we use it a lot, but for some reason I can't get it to work in 
Magnolia.

In blossom-servlet.xml I added:
[code]
<context:include-filter type="aspectj"    
expression="org.infobip.web.magnolia.aspect.myAspect"/>
[/code]

The aspect class is initialized properly (breakpoint in the constructor is 
reached on blossom module start as expected) and the execution is also defined 
properly (IDEA is parsing it correctly and showing all methods in the correct 
package and annotated with the correct annotation):
[code]
@Before("execution(public String 
org.infobip.web.magnolia.controller.component.*.*(..)) && 
@annotation(myAnnotation) ")
[/code]

Also added the necessary deps in the pom :
[code]
                <dependency>
                        <groupId>org.aspectj</groupId>
                        <artifactId>aspectjrt</artifactId>
                        <version>${org.aspectj-version}</version>
                </dependency>
                <dependency>
                        <groupId>org.aspectj</groupId>
                        <artifactId>aspectjweaver</artifactId>
                        <version>${org.aspectj-version}</version>
                </dependency>

[/code]

I'm trying to preprocess the execution of a few methods in 
controllers/templates, some are areas, some components, but can't get the 
aspect triggered in any way.

Tried to initialize the filter from applicationContext.xml also but it makes no 
difference.

Is there anything I'm doing wrong or that I should be aware of?

Any help would be much appreciated,
Thnx in advance!

-- 
Context is everything: 
http://forum.magnolia-cms.com/forum/thread.html?threadId=e11b2879-68fc-4998-9173-06c8cbe6d355


----------------------------------------------------------------
For list details, see: http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to