Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You are using spring aop for aspect support. Spring aop will work only on spring beans. So, the pointcut does not work on the actual class instance i.e. when the controller calls any of its public or private method. In order to log all the methods in the controller, you need to use AspectJ for your aop support by enabling either load time or compile time weaving of all the classes that you want to intercept. Edit:</p> <p>You would need the following for load time weaving :</p> <p>aop.xml</p> <pre><code>&lt;!DOCTYPE aspectj PUBLIC "-//AspectJ//DTD//EN" "http://www.eclipse.org/aspectj/dtd/aspectj.dtd"&gt; &lt;aspectj&gt; &lt;weaver options="-Xset:weaveJavaxPackages=true -verbose -showWeaveInfo -debug"&gt; &lt;include within="*"/&gt; &lt;/weaver&gt; &lt;aspects&gt; &lt;!-- weave in just this aspect --&gt; &lt;aspect name="your.logger.impl.LoggingImpl"/&gt; &lt;/aspects&gt; &lt;/aspectj&gt; </code></pre> <p>This implies weaving in all your files ('within=*', modify as you wish) with the aspect/s specified. On load time you should see verbose information on weaving of classes.</p> <p>Configurations in the spring configurations :</p> <pre><code>&lt;context:load-time-weaver aspectj-weaving="autodetect" weaver-class="org.springframework.instrument.classloading.ReflectiveLoadTimeWeaver"/&gt; </code></pre> <p>Notice the weaving class has to be in the server library path and NOT your application path.</p> <p>The above configurations should do what you are looking out to do.</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