Hello,

I am trying to define a pointcut whose advice will run when method from a Spring Data JPA repository is invoked.

Here is my anonymous pointcut together with the inline advice (from PliEventManagerAspect):
Code:
after(Pli pli) returning: (execution(* org.springframework.data.repository.CrudRepository+.save(Pli)) && args(pli)){
    System.out.println("Caught!!!!");   
}
Here the definition for my PliRepository:
Code:
public interface PliRepository extends GlobalRepository<Pli, Long>, PliRepositoryCustom {
and PliRepositoryImpl:
Code:
public class PliRepositoryImpl extends QueryDslRepositorySupport implements PliRepositoryCustom {
and PliRepositoryCustom:
Code:
public interface PliRepositoryCustom {
and lastly GlobalRepository:
Code:
@NoRepositoryBean
public interface GlobalRepository<T, ID extends Serializable> extends JpaRepository<T, ID> {
I have also set the javaagent command line arg. And I have the following aop.xml:
Code:
<!DOCTYPE aspectj PUBLIC
"-//AspectJ//DTD//EN"
"http://www.eclipse.org/aspectj/dtd/aspectj.dtd">
<aspectj>
    <weaver options="-verbose">
        <include within="org.springframework.data.repository..*"/>
    </weaver>
    <aspects>
        <aspect name="trc.suivi.aspects.PliEventManagerAspect" />
    </aspects>
</aspectj>
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?

Regards,

Julien.

P.S. I deliberately posted on this specific forum instead of the AOP one because my question requires knowledge of Spring Data JPA and especially I can't pinpoint the specific class I need to specify in my poincut...