title: Spring MVC Request method 'PATCH' not supported
body: <p>Is HTTP PATCH not enabled by default in Spring MVC/Boot? I'm getting the ff error:</p>
  <pre><code>org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'PATCH' not supported
          at org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMapping.handleNoMatch(RequestMappingInfoHandlerMapping.java:213)
  </code></pre>
  <p>For my controller:</p>
  <pre><code>@PatchMapping(&quot;/id&quot;)
  public ResourceResponse updateById(@PathVariable Long id, ServletServerHttpRequest request) {
  </code></pre>
  <p>I have my configuration as follows:</p>
  <pre><code>.antMatchers(HttpMethod.PATCH, &quot;/products/**&quot;).hasRole(&quot;MANAGER&quot;)
  ...
  configuration.setAllowedMethods(List.of(&quot;GET&quot;, &quot;POST&quot;, &quot;PUT&quot;, &quot;OPTIONS&quot;, &quot;DELETE&quot;, &quot;PATCH&quot;));
  </code></pre>
  <p>I checked the source code of Spring <code>FrameworkServlet.java</code>, there is something special to PATCH:</p>
  <pre><code>@Override
  protected void service(HttpServletRequest request, HttpServletResponse response)
          throws ServletException, IOException {
  
      HttpMethod httpMethod = HttpMethod.resolve(request.getMethod());
      if (httpMethod == HttpMethod.PATCH || httpMethod == null) {
          processRequest(request, response);
      }
      else {
          super.service(request, response);
      }
  }
  </code></pre>
  <p>I googled already but I was not able to find anything that can help resolve my issue.</p>
  <p>Thank you.</p>