I've created this aspect:
@Pointcut("execution(* com.living.commty.boot.resources.*.* (..))")
public void resourcesCut() {}
I'm trying to get execution after they has been returned:
@AfterReturning(pointcut="resourcesCut()", returning="result")
public void afterReturning(JoinPoint joinPoint, Object result)
{
this.logAfterReturningTrace(joinPoint, result);
}
My class is:
package com.living.commty.boot.resources;
public class EmailResources {
@Inject private ConfigurationResources configurationResources;
@Inject protected TokenResources cipheringResources;
public String buildURI(String id, byte[] token) throws URISyntaxException
{
return "";
}
public byte[] decodeParameter(String value)
{
return "";
}
public void sendActivationMail(User user) throws MailGenerationException
{
}
}
However, they are never reached.
Nevertheless, if I add an `@Before`:
@Before("resourcesCut()")
public void beforeCreate(JoinPoint joinPoint) {
this.logBeforeTrace(joinPoint);
}
it's reached!
I've also added an @AfterThrowing advice and it's able to wrap up to 39 points. However, my @AfterReturning only 6! I've attached images.
Any ideas?