title: spring-boot interceptor is not intercepting
body: <p>I have written an interceptor for my spring-boot app. But when I hit the endpoint, its executing fine.The interceptor is not able to intercept my request.
  Where I am going wrong or missing something?</p>
  
  <p>Below is the Code</p>
  
  <pre><code>@Configuration
  public class WebMvcConfig extends WebMvcConfigurerAdapter {
  
      private static final String PATHS = "/services/api/**";
  
      @Autowired
      private AuthorizationInterceptor authInterceptor;
  
      @Override
      public void addInterceptors(InterceptorRegistry registry) {
          registry.addInterceptor(authInterceptor).addPathPatterns(PATHS);
      }
  
  
  
  }
  </code></pre>
  
  <p>Here is the code for Interceptor:::</p>
  
  <pre><code>@Component
  public class AuthorizationInterceptor implements HandlerInterceptor {
      private static final Logger LOGGER = LoggerFactory.getLogger(AuthorizationInterceptor.class);
      private static final String MSG_BAD_INPUT = "Very Bad Input";
      private static final int MAX_URI_LENGTH = 4;
  
      @Override
      public void afterCompletion(HttpServletRequest arg0, HttpServletResponse arg1, Object arg2, Exception arg3)
              throws Exception {
          // TODO Auto-generated method stub
  
      }
  
      @Override
      public void postHandle(HttpServletRequest arg0, HttpServletResponse arg1, Object arg2, ModelAndView arg3)
              throws Exception {
          // TODO Auto-generated method stub
  
      }
  
      @Override
      public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
              throws Exception {
          System.out.println("Inside Prehandle:::::::-------&gt;");
          this.checkURILength(request);
          System.out.println("After checking:::::::::::----&gt;");
          return true;
  
      }
  
      private void checkURILength(HttpServletRequest request) {
          if (request.getRequestURI().length() &gt; MAX_URI_LENGTH) {
              LOGGER.error("Request URI is too long");
              throw new InvalidInputException(MSG_BAD_INPUT);
          }
      }
  
  
  }
  </code></pre>
  
  <p>Now when I hit the endpoint for my spring-boot app say, its working fine</p>
  
  <pre><code>http://localhost:8181/services/api/companies
  </code></pre>
  
  <p>Basically its not at all calling the prehandle.
  What am I missing????</p>