title: Spring AOP Generic Typing
body: <p>I am new to Spring and I am running into a problem with an aspect. The pointcut is an interface that uses generic typing:</p>
  
  <pre><code>public interface DaoJdbc&lt;T&gt; {
      public void create(T input);
      public T read(int id);
      public void update(T s);
      public void delete(int id);
      public void getDailyMessage();
  }
  </code></pre>
  
  <p>Here is my aspect:</p>
  
  <pre><code>&lt;aop:aspect ref="security"&gt;
      &lt;aop:pointcut id="passwordNeeded"
          expression="execution(* com.user.service.DaoJdbc.*(..))" /&gt;
      &lt;aop:before pointcut-ref="passwordNeeded" method="check" /&gt;
  &lt;/aop:aspect&gt;
  </code></pre>
  
  <p>The aspect will work for <code>delete()</code>, but not for <code>create()</code>. It will work for 'create()' if I use an implementation of DaoJdbc, instead of the interface itself (which I do not want to do). I can assume this is an issue with the fact that <code>update()</code> uses a generic type and <code>delete()</code> does not. Is there any way I could get this to work using the interface? Thanks in advance.</p>