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

    <tfoot id='Xcful'></tfoot>
  • <small id='Xcful'></small><noframes id='Xcful'>

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

      <legend id='Xcful'><style id='Xcful'><dir id='Xcful'><q id='Xcful'></q></dir></style></legend>

        使用 Struts 2 REST 插件的带有附加参数的自定义函数

        Custom function with additional argument using Struts 2 REST plugin(使用 Struts 2 REST 插件的带有附加参数的自定义函数)
          <tfoot id='qmSkb'></tfoot>
            <bdo id='qmSkb'></bdo><ul id='qmSkb'></ul>

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

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

                <legend id='qmSkb'><style id='qmSkb'><dir id='qmSkb'><q id='qmSkb'></q></dir></style></legend>
                  <tbody id='qmSkb'></tbody>
                  本文介绍了使用 Struts 2 REST 插件的带有附加参数的自定义函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  在 Struts2 REST 插件控制器的 URL 中是否有额外的参数?

                  Is there anyway to have additional arguments in the URL of a Struts2 REST plugin controller?

                  例如,我有:

                  public class PersonController() implements ModelDriven<Object> {
                  
                      private Integer id;
                      ...
                  
                      public String comment() { ... };
                      // Getter and Setter for id
                  }
                  

                  成功到达的地方

                  [domain]/person/{id}/comment
                  

                  但是,我希望有一个类似的网址

                  However, what I would like to be able to is have a URL like

                  [domain]/person/{id}/comment/{commentId}
                  

                  推荐答案

                  不是 REST 样式有这样的 URL.相反,您可以使用两个 URL 来访问不同的资源.

                  It would be not REST style to have such URLs. Instead, you can use two URLs to access different resources.

                   [domain]/person/{id}
                  
                   [domain]/comment/{commentId}
                  

                  另一方面,如果您混合使用约定和其他样式映射,您可以使用 namedVariableregex 模式匹配器来实现您想要的.

                  On the other hand if you mix convention and rest style mapping you can use namedVariable or regex pattern matcher to achieve what you would like to have.

                  这篇关于使用 Struts 2 REST 插件的带有附加参数的自定义函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  How to send data to COM PORT using JAVA?(如何使用 JAVA 向 COM PORT 发送数据?)
                  How to make a report page direction to change to quot;rtlquot;?(如何使报表页面方向更改为“rtl?)
                  Use cyrillic .properties file in eclipse project(在 Eclipse 项目中使用西里尔文 .properties 文件)
                  Is there any way to detect an RTL language in Java?(有没有办法在 Java 中检测 RTL 语言?)
                  How to load resource bundle messages from DB in Java?(如何在 Java 中从 DB 加载资源包消息?)
                  How do I change the default locale settings in Java to make them consistent?(如何更改 Java 中的默认语言环境设置以使其保持一致?)
                  <legend id='IBxyP'><style id='IBxyP'><dir id='IBxyP'><q id='IBxyP'></q></dir></style></legend>

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

                        <bdo id='IBxyP'></bdo><ul id='IBxyP'></ul>
                        <tfoot id='IBxyP'></tfoot>

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