You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by li...@apache.org on 2019/01/26 02:39:39 UTC

[servicecomb-docs] branch master updated: improve description of rest-over-servlet

This is an automated email from the ASF dual-hosted git repository.

liubao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-docs.git


The following commit(s) were added to refs/heads/master by this push:
     new 653c26d  improve description of rest-over-servlet
653c26d is described below

commit 653c26d3ddf6ccf4e0b7edc763b04af2c7b68cec
Author: wujimin <wu...@huawei.com>
AuthorDate: Sat Jan 26 10:32:29 2019 +0800

    improve description of rest-over-servlet
---
 .../en_US/build-provider/protocol/rest-over-servlet.md  | 17 +++++++++--------
 .../zh_CN/build-provider/protocol/rest-over-servlet.md  | 17 +++++++++--------
 2 files changed, 18 insertions(+), 16 deletions(-)

diff --git a/java-chassis-reference/en_US/build-provider/protocol/rest-over-servlet.md b/java-chassis-reference/en_US/build-provider/protocol/rest-over-servlet.md
index edfd14b..4eb0532 100644
--- a/java-chassis-reference/en_US/build-provider/protocol/rest-over-servlet.md
+++ b/java-chassis-reference/en_US/build-provider/protocol/rest-over-servlet.md
@@ -53,7 +53,7 @@ When integrating with servlet, there are a few concepts involved:
   </web-app>
   ```
 
-  The classpath*:META-INF/spring/*.bean.xml configured in contextConfigLocation is optional, because the ServiceComb will ensure that it is included in the load path.
+  The `classpath*:META-INF/spring/*.bean.xml` configured in contextConfigLocation is optional, because the ServiceComb will ensure that it is included in the load path.
 
   This is just an example to indicate that the user can customize the contextConfigLocation.
 
@@ -92,9 +92,9 @@ When integrating with servlet, there are a few concepts involved:
 
 - ServiceComb servlet  
 
-  The url pattern can be set according to the business logic. The following /rest/* is just an example, not a fixed value.
+  The url pattern can be set according to the business logic. The following `/rest/*` is just an example, not a fixed value.
 
-  Url pattern must end with /*
+  Url pattern must end with `/*`
 
   The following two declarations types can not be used at the same time.
 
@@ -239,9 +239,10 @@ The related items for REST over Servlet in the microservice.yaml are described b
 
 Table1-1 REST over Servlet Configuration Items
 
-| Configuration Item |Default Value |Range|Required|Description|Remarks                                                         |
-| :---------------------------------- | :----------- | :------- | :------- | :---------------------------------- | :----------------------------------------------------------- |
-| servicecomb.rest.address            | 0.0.0.0:8080 | -        | No       |They service listening address| Should be the same with the web container's listening address|
-| servicecomb.rest.server.timeout     | 3000         | -        | No       | Server timeout                            | In milliseconds                                                 |
-| servicecomb.rest.servlet.urlPattern |            |          | No       | Used to simplify servlet+servlet mapping config | This item is used only when servlet+servlet mapping is not configured in web.xml.The format is:/\* or /path/\*, where path can be nested |
+| Configuration Item                               |Default Value |Required|Description|
+| :----------------------------------------------- | :----------- | :----- | :-------- |
+| servicecomb.rest.address                         | 0.0.0.0:8080 | No     |The service listening address<br>Should be the same with the web container's listening address|
+| servicecomb.rest.server.timeout                  | -1           | No     |Server aync servlet timeout in milliseconds, suggest set to -1                                |
+| servicecomb.rest.server.requestWaitInPoolTimeout | 30000        | No     |for sync business logic, timeout in milliseconds for waiting in executor queue                |
+| servicecomb.rest.servlet.urlPattern              |              | No     |Used to simplify servlet+servlet mapping config<br>This item is used only when servlet+servlet mapping is not configured in web.xml.The format is:/\* or /path/\*, where path can be nested |
 
diff --git a/java-chassis-reference/zh_CN/build-provider/protocol/rest-over-servlet.md b/java-chassis-reference/zh_CN/build-provider/protocol/rest-over-servlet.md
index a451b01..3dcb026 100644
--- a/java-chassis-reference/zh_CN/build-provider/protocol/rest-over-servlet.md
+++ b/java-chassis-reference/zh_CN/build-provider/protocol/rest-over-servlet.md
@@ -40,7 +40,7 @@ REST over Servlet对应使用web容器部署运行,需要新建一个servlet
     </listener>
   </web-app>
   ```
-  其中classpath*:META-INF/spring/*.bean.xml,无论任何情况,都可以不在contextConfigLocation中配置,因为ServiceComb机制会确保加载路径中包含它。  
+  其中`classpath*:META-INF/spring/*.bean.xml`,无论任何情况,都可以不在contextConfigLocation中配置,因为ServiceComb机制会确保加载路径中包含它。  
   这里仅仅是个示例,表示如果使用者需要定制contextConfigLocation,可以使用这个方法。  
   
   * 使用springMVC的UI或RestController,且存在org.apache.servicecomb.transport.rest.servlet.CseDispatcherServlet  
@@ -71,8 +71,8 @@ REST over Servlet对应使用web容器部署运行,需要新建一个servlet
   }
   ```
 * ServiceComb servlet  
-  url pattern根据业务自身规划设置即可,下面的/rest/*仅仅是示例,不是固定值。  
-  url pattern必须以/\*结尾  
+  url pattern根据业务自身规划设置即可,下面的`/rest/*`仅仅是示例,不是固定值。  
+  url pattern必须以`/*`结尾  
   以下两种声明方式也是多选一的关系,不要同时使用
   * 标准声明
   ```xml
@@ -193,10 +193,11 @@ REST over Servlet在microservice.yaml文件中的配置项见表3-9。
 
 表1-1 REST over Servlet配置项说明
 
-| 配置项 | 默认值 | 取值范围 | 是否必选 | 含义 | 注意 |
-| :--- | :--- | :--- | :--- | :--- | :--- |
-| servicecomb.rest.address | 0.0.0.0:8080 | - | 否 | 服务监听地址 | 必须配置为与web容器监听地址相同的地址 |
-| servicecomb.rest.server.timeout | 3000 | - | 否 | 超时时间 | 单位为毫秒 |
-| servicecomb.rest.servlet.urlPattern | 无 |  | 否 | 用于简化servlet+servlet mapping配置 | 只有在web.xml中未配置servlet+servlet mapping时,才使用此配置项,配置格式为:/\* 或  /path/\*,其中path可以是多次目录 |
+| 配置项                                           | 默认值       | 是否必选 | 含义                                                  |
+| :----------------------------------------------- | :----------- | :------- | :---------------------------------------------------- |
+| servicecomb.rest.address                         | 0.0.0.0:8080 | 否       |服务监听地址<br>必须配置为与web容器监听地址相同的地址  |
+| servicecomb.rest.server.timeout                  | -1           | 否       |异步servlet超时时间, 单位为毫秒<br>建议保持默认值      |
+| servicecomb.rest.server.requestWaitInPoolTimeout | 30000        | 否       |在同步线程中排队等待执行的超时时间,单位为毫秒         |
+| servicecomb.rest.servlet.urlPattern              | 无           | 否       | 用于简化servlet+servlet mapping配置<br>只有在web.xml中未配置servlet+servlet mapping时,才使用此配置项,配置格式为:/\* 或  /path/\*,其中path可以是多次目录 |