<small id='i3EhN'></small><noframes id='i3EhN'>

  • <legend id='i3EhN'><style id='i3EhN'><dir id='i3EhN'><q id='i3EhN'></q></dir></style></legend>

      • <bdo id='i3EhN'></bdo><ul id='i3EhN'></ul>
      <tfoot id='i3EhN'></tfoot>

      1. <i id='i3EhN'><tr id='i3EhN'><dt id='i3EhN'><q id='i3EhN'><span id='i3EhN'><b id='i3EhN'><form id='i3EhN'><ins id='i3EhN'></ins><ul id='i3EhN'></ul><sub id='i3EhN'></sub></form><legend id='i3EhN'></legend><bdo id='i3EhN'><pre id='i3EhN'><center id='i3EhN'></center></pre></bdo></b><th id='i3EhN'></th></span></q></dt></tr></i><div id='i3EhN'><tfoot id='i3EhN'></tfoot><dl id='i3EhN'><fieldset id='i3EhN'></fieldset></dl></div>
      2. 如何将 Spring Boot @RepositoryRestResource 映射到特定的 url?

        时间:2024-08-24
          <tbody id='DJHJQ'></tbody>

              <i id='DJHJQ'><tr id='DJHJQ'><dt id='DJHJQ'><q id='DJHJQ'><span id='DJHJQ'><b id='DJHJQ'><form id='DJHJQ'><ins id='DJHJQ'></ins><ul id='DJHJQ'></ul><sub id='DJHJQ'></sub></form><legend id='DJHJQ'></legend><bdo id='DJHJQ'><pre id='DJHJQ'><center id='DJHJQ'></center></pre></bdo></b><th id='DJHJQ'></th></span></q></dt></tr></i><div id='DJHJQ'><tfoot id='DJHJQ'></tfoot><dl id='DJHJQ'><fieldset id='DJHJQ'></fieldset></dl></div>

              <small id='DJHJQ'></small><noframes id='DJHJQ'>

              • <bdo id='DJHJQ'></bdo><ul id='DJHJQ'></ul>

                1. <tfoot id='DJHJQ'></tfoot><legend id='DJHJQ'><style id='DJHJQ'><dir id='DJHJQ'><q id='DJHJQ'></q></dir></style></legend>
                2. 本文介绍了如何将 Spring Boot @RepositoryRestResource 映射到特定的 url?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我似乎无法将我的存储库映射到以下位置以外的任何位置:

                  I cannot seem to be able to map my Repository in any location other than the following:

                  @RepositoryRestResource(collectionResourceRel = "item", path = "item")
                  public interface ItemRepository extends PagingAndSortingRepository<Item, Long> {
                  

                  我认为我可以使用:

                   path = "/some/other/path/item"
                  

                  但映射无法解析.我明白了:

                  but the mapping does not resolve. I get:

                  HTTP ERROR 404
                  
                  Problem accessing /some/other/path/item. Reason:
                  
                  Not Found
                  

                  在spring-data javadoc path中定义为:"要导出此资源的路径段."

                  In spring-data javadoc path is defined as: "The path segment under which this resource is to be exported."

                  我做错了什么?

                  推荐答案

                  要更改基本 URI,您也可以将其添加到 application.properties:

                  To change the base URI, you can also just add this to application.properties:

                  spring.data.rest.base-path=/my/base/uri
                  

                  这篇关于如何将 Spring Boot @RepositoryRestResource 映射到特定的 url?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:Mongo - 忽略属性被持久化 下一篇:Spring Data JPA - 是否可以对计算的属性进行排序?

                  相关文章

                  <tfoot id='zHLA7'></tfoot>
                  1. <legend id='zHLA7'><style id='zHLA7'><dir id='zHLA7'><q id='zHLA7'></q></dir></style></legend>
                  2. <i id='zHLA7'><tr id='zHLA7'><dt id='zHLA7'><q id='zHLA7'><span id='zHLA7'><b id='zHLA7'><form id='zHLA7'><ins id='zHLA7'></ins><ul id='zHLA7'></ul><sub id='zHLA7'></sub></form><legend id='zHLA7'></legend><bdo id='zHLA7'><pre id='zHLA7'><center id='zHLA7'></center></pre></bdo></b><th id='zHLA7'></th></span></q></dt></tr></i><div id='zHLA7'><tfoot id='zHLA7'></tfoot><dl id='zHLA7'><fieldset id='zHLA7'></fieldset></dl></div>
                      <bdo id='zHLA7'></bdo><ul id='zHLA7'></ul>

                      <small id='zHLA7'></small><noframes id='zHLA7'>