title: Generic return type possible with Spring AOP
body: <p>I tried to create Aspect using generic annotation like</p>
  
  <pre><code>@Aspect
  @Component
  public class CommonAspect&lt;T extends CommonEntity&gt;{
  
  
      @AfterReturning(value = "@annotation(audit)",returning="retVal")
      public void save(JoinPoint jp,T retVal, Audit audit) {
  
          Audit audit = new Audit();
          audit.setMessage(retVal.getAuditMessage());
          //other code to store audit
  
      }
  
  
  }
  </code></pre>
  
  <p>Is this possible ? it fail in my case. 
  I want to use this @Audit annotation for person, user etc different kind of entity. so return value can be generic. </p>