title: Bind Spring MVC Interceptor to URL with Java config
body: <p>What is the Java config alternative to Spring MVC XML namespace's <code>&lt;mvc:interceptor&gt;</code> tag:</p>
  
  <pre><code>&lt;mvc:interceptors&gt;
      &lt;mvc:interceptor&gt;
         &lt;mvc:mapping path="/some/specific/path"/&gt;
         &lt;ref bean="XX" /&gt;
      &lt;mvc:interceptor&gt;
  &lt;mvc:interceptors&gt;
  </code></pre>
  
  <p>I know about overriding the <code>addInterceptors()</code> method of <code>WebMvcConfigurerAdapter</code> but  I'm particularly interested in mapping my interceptors to certain URLs (or controllers).</p>