title: AspectJ + Perf4J + Spring and @Profiled annotation?
body: <p>I can't get AspectJ to work at all, and I have ran out of ideas after following 10 different tutorials.</p>
  
  <p>Here is what I am trying to do...</p>
  
  <p>I have a Spring application. It uses Spring, Perf4J, and Now Aspect(if it ever works!) and I want to use @Profiled("some tag here") at the tog of my public method. That is it, nothing too fancy.</p>
  
  <p>Here is the code I am trying to run :</p>
  
  <pre><code>@Override
  @Profiled(tag = "MainClass" + ".runMethod", logFailuresSeparately = true)
  public Collection&lt;Throwable&gt; runMethod() throws Exception {
  
      System.out.println("Running a simple method that I want timings for.");
  
  }
  </code></pre>
  
  <p>Here are my POM dependencies used in maven to get everything to set up.</p>
  
  <pre><code>&lt;dependencies&gt;
      &lt;!-- Spring (includes spring-aop)--&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-context&lt;/artifactId&gt;
          &lt;version&gt;${spring.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;!-- AspectJ (required spring-aop dependency) --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.aspectj&lt;/groupId&gt;
          &lt;artifactId&gt;aspectjweaver&lt;/artifactId&gt;
          &lt;version&gt;1.8.5&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;!-- LOG --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.perf4j&lt;/groupId&gt;
          &lt;artifactId&gt;perf4j&lt;/artifactId&gt;
          &lt;version&gt;${perf4j.version}&lt;/version&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  </code></pre>
  
  <p>Here is the aspect beans file : </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
  &lt;beans xmlns="http://www.springframework.org/schema/beans" 
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xmlns:context="http://www.springframework.org/schema/context"
     xmlns:aop="http://www.springframework.org/schema/aop"
  
     xsi:schemaLocation="
      http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
      http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
      http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd"&gt;
  
  &lt;aop:aspectj-autoproxy proxy-target-class="true"&gt;
      &lt;aop:include name="timingAspect"/&gt;
  &lt;/aop:aspectj-autoproxy&gt;
  
  &lt;!--&lt;context:load-time-weaver/&gt; --&gt;
  
  &lt;!--  The perf4j aspect --&gt;
  &lt;bean id="timingAspect" class="org.perf4j.log4j.aop.TimingAspect"/&gt;
  </code></pre>
  
  <p></p>
  
  <p>Here is how I bring that XML beans file in (within the spring application context file) :</p>
  
  <pre><code>&lt;import resource="aspectBeans.xml" /&gt;
  </code></pre>
  
  <p>Now, the application compiles, it runs, and it prints my System.out.println line, but I am seeing absolutely nothing related to timing. </p>