title: Custom annotation for method in controller that extends an abstract controller
body: <p>What I have to do is pretty simple using interceptors but I was really hoping for a more elegant solution based on annotations. The thing is that my "solution" doesn't really work and I do not know why. Maybe this isn't even possible.  </p>
  
  <p>My basic stack is:
  spring boot 1.4.1:</p>
  
  <ul>
  <li>spring-boot-starter-web</li>
  <li>spring-boot-starter-aop</li>
  <li>spring-boot-starter-jdbc</li>
  <li>spring-boot-starter-cache</li>
  </ul>
  
  <p>spring-beans 4.3.4
  and various other utilities and test jars.</p>
  
  <p>I have several controllers that extend an abstract controller. This abstract controller must prepare a connection and then each controller is using its own specific implementation placed in <strong>acquire()</strong> method. From time to time some cron jobs are hitting this endpoints. We want to make an audit on some controllers/jobs but not necessarily all of them. 
  So I was thinking about adding a custom annotation where the audit should be.</p>
  
  <pre><code>public abstract class ImportController { 
      @RequestMapping(value = "/checkout", method = RequestMethod.GET, produces = "application/json")
      public String importEntities() {
           //some code here ....
           MyResult result = acquire(param);
           //some code again ....
      }
  
       public abstract MyResult acquire(MyParam param)
  }
  </code></pre>
  
  <p>Implementation that needs audit:</p>
  
  <pre><code>@RestController
  @RequestMapping(value = "/cars")
  public class CarsImportController extends ImportController {
  
       @Override
       @MyJobAudit // &lt;--- this should add a pointcut used for Audit logging
       public MyResult acquire(MyParam param) {
            //cars specific code
       }
  }
  </code></pre>
  
  <p>Implementation that doesn't need audit</p>
  
  <pre><code>@RestController
  @RequestMapping(value = "/tomatoes")
  public class TomatoesImportController extends ImportController {
  
       @Override
       //no audit annotation
       public MyResult acquire(MyParam param) {
             //tomatoes specific code
       }
  }
  </code></pre>
  
  <p>My JobAudit annotation:</p>
  
  <pre><code>@Retention(RetentionPolicy.RUNTIME)
      public @interface MyJobAudit {
  }
  </code></pre>
  
  <p>and the aspects class:</p>
  
  <pre><code>@Aspect
  @Component
  public class SystemAspectArchitecture {
      @Pointcut("@annotation(MyJobAudit)")
      public void auditableJob() {
      }
  }
  </code></pre>
  
  <p>I tried to put my annotation on various service classes and it works. But not on <strong>acquire()</strong> method. Something is definitely wrong here. I can't figure out what...</p>