title: Use Spring annotations to automatically apply Hibernate Interceptor?
body: <p>In my service class I need the hibernate session available. I currently do this in the beans.xml:</p>
  
  <pre><code>&lt;bean id = "userDao" class="org.springframework.aop.framework.ProxyFactoryBean"&gt;
   &lt;property name="target"&gt;
     &lt;ref bean="userDaoTarget" /&gt;
   &lt;/property&gt;
  
   &lt;property name="proxyInterfaces"&gt;
     &lt;value&gt;com.app.dao.UserDao&lt;/value&gt;
   &lt;/property&gt;
  
   &lt;property name="interceptorNames"&gt;
     &lt;list&gt;
       &lt;value&gt;hibernateInterceptor&lt;/value&gt;
     &lt;/list&gt;
   &lt;/property&gt;
  
   &lt;qualifier value="proxy" /&gt;
  &lt;/bean&gt;
  
  ...
  
  &lt;bean id="hibernateInterceptor" 
     class="org.springframework.orm.hibernate3.HibernateInterceptor"&gt;
   &lt;property name="sessionFactory"&gt;
     &lt;ref bean="sessionFactory" /&gt;
   &lt;/property&gt;
  &lt;bean&gt;
  </code></pre>
  
  <p>(copied by hand, may be some typos..)</p>
  
  <p>I'm moving to using annotations over XML, I was wondering if there was a way to use them to configure the proxy as I have above <strong>including the hibernate interceptor</strong>? If not - is there a way that I can reduce the amount of XML (with about 7 DAOs it makes it very cluttered)</p>