I'm trying to intercept a method of an interface annoted with a JAX-RS @POST. My Pointcut works for all non-interface methods and if the @POST-Annotation is directly at the called method.
The interface method to intercept:
@POST
Response postToConnector(@Context CallContext callContext, String contentStream) throws Exception;
The Pointcut to match the method:
@Pointcut("call(@(javax.ws.rs.DELETE || javax.ws.rs.GET || javax.ws.rs.HEAD || javax.ws.rs.OPTIONS || "
+ "javax.ws.rs.POST || javax.ws.rs.PUT) public * org.myapp..webapi..*(..))")
public void anyPublicWebApiPointcut()
{
...
}
The interface is inside a package com.myapp.social.webapi.v1 and even if I change the method to public AspectJ will not intercept the call.
Is there anything to change within my Pointcut? How can I make this working?