title: Java Spring AOP: Using CustomizableTraceInterceptor with JavaConfig @EnableAspectJAutoProxy, not XML <aop:advisor>
body: <p>Spring AOP has a method-level tracer called <code>CustomizableTraceInterceptor</code>. Using Spring's XML configuration approach, one would set up this tracer like so:</p>
  
  <pre><code>&lt;bean id="customizableTraceInterceptor" class="
    org.springframework.aop.interceptor.CustomizableTraceInterceptor"&gt;
    &lt;property name="enterMessage" value="Entering $[methodName]($[arguments])"/&gt;
    &lt;property name="exitMessage" value="Leaving $[methodName](): $[returnValue]"/&gt;
  &lt;/bean&gt;
  
  &lt;aop:config&gt;
    &lt;aop:advisor advice-ref="customizableTraceInterceptor"
      pointcut="execution(public * org.springframework.data.jpa.repository.JpaRepository+.*(..))"/&gt;
  &lt;/aop:config&gt;
  </code></pre>
  
  <p>I would like to set up above configuration using Spring's JavaConfig style (i.e. taking advantage of Java annotations, especially <code>@EnableAspectJAutoProxy</code> for activating AspectJ in JavaConfig).</p>
  
  <pre><code>@Configuration
  @EnableTransactionManagement
  @EnableJpaRepositories(basePackages = { "some.package" })
  @ComponentScan(basePackages = { "some.package2", "some.package3" })
  @EnableAspectJAutoProxy
  public class FacebookDomainConfiguration {
  
      @Bean someBean() {
      ...
      }
  ...
  }
  </code></pre>
  
  <p>What is the <code>@EnableAspectJAutoProxy</code>-style equivalent for <code>&lt;aop:advisor advice-ref="customizableTraceInterceptor" ...&gt;</code>?</p>