-
Feb 16th, 2010, 09:53 AM
#1
How to advice spring mvc controllers
Hi all
I am just wondering if anyone knows of a strategy to advice spring mvc controllers. I know that adding an advice to methods on the controllers will not work because of spring's proxy based aop system. However, if the controllers cannot be adviced directly, how can one address certain cross cutting concerns which crosscut a controller e.g. logging. if anyone can point me in the direction of strategies or threads on this forum which have addressed such issues, I will be very appreciative.
thanks
-
Feb 17th, 2010, 10:22 AM
#2
I have resolved this problem but why it works now, i have no idea. Basically, as I am using Eclipse, I had to convert my project to an AspectJ project i.e. right click project > Configure > Convert to AspectJ Project.
After doing that, it worked but I am still at a loss as to why.
Also, it turns out that you can advice controllers. After doing as described above the advice on the controllers started to work. I read somewhere that you could not apply aspects to spring controllers. Either I was misinformed or I have got something totally wrong. Still miffed
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules