Note that there are some explanatory texts on larger screens.

plurals
  1. POAspectj doesn't catch all events in spring framework?
    text
    copied!<p>My project is based on spring framework 2.5.4. And I try to add aspects for some controllers (I use aspectj 1.5.3).</p> <p>I've enabled auto-proxy in application-servlet.xml, just pasted these lines to the end of the xml file:</p> <pre><code>&lt;aop:aspectj-autoproxy /&gt; &lt;bean id="auditLogProcessor" class="com.example.bg.web.utils.AuditLogProcessor" /&gt; </code></pre> <p>Created aspect:</p> <pre><code>package com.example.bg.web.utils; import org.apache.log4j.Logger; import org.aspectj.lang.annotation.After; import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Pointcut; @Aspect public class AuditLogProcessor { private final static Logger log = Logger.getLogger(AuditLogProcessor.class); @After("execution(* com.example.bg.web.controllers.assets.AssetThumbnailRebuildController.rebuildThumbnail(..))") public void afterHandleRequest() { log.info("test111"); } @After("execution(* com.example.bg.web.controllers.assets.AssetThumbnailRebuildController.rebuildThumbnail(..))") public void afterRebuildThumbnail() { log.info("test222"); } }</code></pre> <p>My controllers:</p> <pre><code>class AssetAddController implements Controller class AssetThumbnailRebuildController extends MultiActionController</code></pre> <p>When I set brake points in aspect advisors and invoke controllers I catch only afterHandleRequest() but not afterRebildThumbnail() What did I do wrong?</p> <p><strong>NOTE</strong></p> <p>I'm asking this question on behalf of my friend who doesn't have access to SO beta, and I don't have a clue what it's all about.</p> <p><strong>EDIT</strong></p> <p>There were indeed some misspellings, thanks Cheekysoft. But the problem still persists.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload