title: How do you block some REST methods with Spring Data Rest?
body: <p>According to the docs here</p>
  
  <p><a href="https://docs.spring.io/spring-data/rest/docs/3.2.2.RELEASE/reference/html/#customizing-sdr.http-methods.default-exposure" rel="nofollow noreferrer">https://docs.spring.io/spring-data/rest/docs/3.2.2.RELEASE/reference/html/#customizing-sdr.http-methods.default-exposure</a></p>
  
  <p>You can block certain REST methods by doing </p>
  
  <pre><code>ExposureConfiguration config = repositoryRestConfiguration.getExposureConfiguration();
  
  config.forDomainType(User.class).disablePutForCreation(); 
  config.withItemExposure((metadata, httpMethods) -&gt; httpMethods.disable(HttpMethod.PATCH)); 
  </code></pre>
  
  <p>but how do you block say "PATCH" for a sub resource?</p>
  
  <p>So I can block </p>
  
  <pre><code>PATCH /api/users/1
  </code></pre>
  
  <p>but how to block</p>
  
  <pre><code>PATCH /api/users/1/tag
  </code></pre>