title: Spring AOP: Annotation on any method called x not working
body: <p>I am getting started with AOP for the first time.</p>
  
  <p>I have my first aspect as follows:</p>
  
  <pre><code>@Aspect
  public class SyncLoggingAspect {
      private final Logger logger = Logger.getLogger(this.getClass());
  
      @Before("execution(public * *(..))")
      public void anyPublic() {
          System.out.println("HIT POINTCUT");
      }
  }
  </code></pre>
  
  <p>This sucessfully proceeds to be invoked on any method call which is public.  However when I change it to this:</p>
  
  <pre><code>@Before("execution(public * doPoll(..))")
  public void anyPublic() {
      System.out.println("HIT POINTCUT");
  }
  </code></pre>
  
  <p>I would expect it to work on any public method called "doPoll", yet when a method such as this is called nothing happens:</p>
  
  <pre><code>public class GmailContactPoller extends ContactPoller&lt;GoogleUser, ContactPusher&lt;GoogleUser&gt;&gt; {
      Logger logger = Logger.getLogger(this.getClass());
  
      @Override
      public List&lt;? extends ContactPusher&lt;GoogleUser&gt;&gt; doPoll() throws PollException {
             ...
      }
  }
  </code></pre>
  
  <p>Is there something I am missing with the EL syntax?  Or is this something to do with the inheritance hierarchy?  The superclass method of doPoll is abstract in an abstract class called Poller.  Does not having an interface cause problems?</p>
  
  <p><b>Edit</b>:  I just noticed my IDE enables spring aspect tooling, and now I have the following compiler warning by the method:</p>
  
  <p>"Description    Resource    Path    Location    Type
  advice defined in datasync.aop.aspects.SyncLoggingAspect has not been applied [Xlint:adviceDidNotMatch] SyncLoggingAspect.java  /DataSync/src/main/datasync/aop/aspects"    </p>