title: How to prevent some HTTP methods from being exported from my MongoRepository?
body: <p>I'm using spring-data-rest and I have a MongoRepository like this:</p>
  
  <pre><code>@RepositoryRestResource
  interface MyEntityRepository extends MongoRepository&lt;MyEntity, String&gt; {
  }
  </code></pre>
  
  <p>I would like to allow the GET methods but disable PUT, POST, PATCH and DELETE (read only web service).</p>
  
  <p>According to <a href="http://docs.spring.io/spring-data/rest/docs/2.2.2.RELEASE/reference/html/#repository-resources.collection-resource" rel="noreferrer">http://docs.spring.io/spring-data/rest/docs/2.2.2.RELEASE/reference/html/#repository-resources.collection-resource</a> I should be able to do that like this:</p>
  
  <pre><code>@RepositoryRestResource
  interface MyEntityRepository extends MongoRepository&lt;MyEntity, String&gt; {
  
      @Override
      @RestResource(exported = false)
      public MyEntity save(MyEntity s);
  
      @Override
      @RestResource(exported = false)
      public void delete(String id);
  
      @Override
      @RestResource(exported = false)
      public void delete(MyEntity t);
  }
  </code></pre>
  
  <p>It doesn't seem to work as I can still do PUT, POST, PATCH and DELETE requests.</p>