title: Trying to advise a method from Spring Data JPA repository using aspectJ
body: <p>I am trying to define a pointcut whose advice will run when method from a Spring Data JPA repository is invoked.</p>
  
  <p>Here is my anonymous pointcut together with the inline advice (from <code>PliEventManagerAspect</code>):</p>
  
  <pre><code>after(Pli pli) returning: (execution(* org.springframework.data.repository.CrudRepository+.save(Pli)) &amp;&amp; args(pli)){
      System.out.println("Caught!!!!");   
  }
  </code></pre>
  
  <p>Here the definition for my PliRepository:</p>
  
  <pre><code>public interface PliRepository extends GlobalRepository&lt;Pli, Long&gt;, PliRepositoryCustom {
  </code></pre>
  
  <p>and PliRepositoryImpl:</p>
  
  <pre><code>public class PliRepositoryImpl extends QueryDslRepositorySupport implements PliRepositoryCustom {
  </code></pre>
  
  <p>and PliRepositoryCustom:</p>
  
  <pre><code>public interface PliRepositoryCustom {
  </code></pre>
  
  <p>and lastly GlobalRepository:</p>
  
  <pre><code>@NoRepositoryBean
  public interface GlobalRepository&lt;T, ID extends Serializable&gt; extends JpaRepository&lt;T, ID&gt; {
  </code></pre>
  
  <p>I have also set the javaagent command line arg. And I have the following 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="-verbose"&gt;
          &lt;include within="org.springframework.data.repository..*"/&gt;
      &lt;/weaver&gt;
      &lt;aspects&gt;
          &lt;aspect name="trc.suivi.aspects.PliEventManagerAspect" /&gt;
      &lt;/aspects&gt;
  &lt;/aspectj&gt;
  </code></pre>
  
  <p>The above advice, which is supposed to run in LTW since it is advising a class in a jar, is not run at all... I am sure I must make some mistake in the pointcut definition. Can anyone please help?</p>