title: How to globally customize the collection resource rel and path for Spring Data REST resources?
body: <p>Basing on <a href="https://spring.io/guides/gs/accessing-data-rest/" rel="nofollow">https://spring.io/guides/gs/accessing-data-rest/</a> in the sample project <a href="https://github.com/jcoig/gs-accessing-data-rest" rel="nofollow">https://github.com/jcoig/gs-accessing-data-rest</a>) i have repository defined as follows:</p>
  
  <pre><code>@RepositoryRestResource
  public interface PersonRepository extends PagingAndSortingRepository&lt;Person, Long&gt; {
      List&lt;Person&gt; findByLastName(@Param("name") String name);
  }
  </code></pre>
  
  <p>Such defined repository is available via <code>http://localhost:8080/persons</code> and the response is:</p>
  
  <pre><code>{
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/persons{?page,size,sort}",
        "templated" : true
      },
      "search" : {
        "href" : "http://localhost:8080/persons/search"
      }
    },
    "_embedded" : {
      "persons" : [ {
        "firstName" : "John",
        "lastName" : "Smith",
        "_links" : {
          "self" : {
            "href" : "http://localhost:8080/persons/1"
          }
        }
      } ]
    },
    "page" : {
      "size" : 20,
      "totalElements" : 1,
      "totalPages" : 1,
      "number" : 0
    }
  }
  </code></pre>
  
  <p>I don't want to have <code>persons</code> in the URL and I don't want to have <code>persons</code> as the key in the returned JSON. Of Course I can define my repository as below:</p>
  
  <pre><code>@RepositoryRestResource(collectionResourceRel = "key", path = "path")
  public interface PersonRepository extends PagingAndSortingRepository&lt;Person, Long&gt; {
      List&lt;Person&gt; findByLastName(@Param("name") String name);
  }
  </code></pre>
  
  <p>but my question is how to change default Spring's behavior and got custom key and custom path  provider (<strong>just as example</strong> to disable <code>s</code> suffixes).</p>