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 281dc64 Fix maven settings notes (#211)
281dc64 is described below
commit 281dc648a5dc683f26d5dbee2f0f1dbaf986eeed
Author: bao liu <[email protected]>
AuthorDate: Mon Dec 7 15:24:13 2020 +0800
Fix maven settings notes (#211)
---
.../en_US/docs/start/development-environment.md | 71 ++++------------------
.../zh_CN/docs/references-handlers/ratelimit.md | 15 +++--
.../zh_CN/docs/start/development-environment.md | 69 ++++-----------------
3 files changed, 32 insertions(+), 123 deletions(-)
diff --git a/java-chassis-reference/en_US/docs/start/development-environment.md
b/java-chassis-reference/en_US/docs/start/development-environment.md
index 216ac30..3546609 100644
--- a/java-chassis-reference/en_US/docs/start/development-environment.md
+++ b/java-chassis-reference/en_US/docs/start/development-environment.md
@@ -37,65 +37,18 @@ The JDK has been installed successfully.
### **installation steps**
-a. Download the Maven installation package at the official address.
-
-b. (Optional) Download the Eclipse plugin m2eclipse at the official address.
The latest Eclipse version comes with a Maven plugin, so you don't have to
download this plugin.
-
-c. Unzip the Maven installation package to the native path.
-
-d. Set environment variables.
-
-* Set the M2\_HOME environment variable to point to the Maven installation
directory.
-
-* Add %M2\_HOME%\bin to the system path path.
-
-e. (Optional) Set a local repository path to hold the plug-ins and dependent
copies obtained from the remote repository.
-
-Here is the path D:\maven\repository. Find the settings.xml file in /conf and
set localRepository to D:\maven\repository
-
-f. (Optional) In order to quickly download various dependencies, it is
recommended to configure the maven repository settings.
-
-In `profiles` element, the content below should be added:
-```xml
-<profile>
- <id>MyProfile</id>
- <repositories>
- <repository>
- <id>SDK</id>
-
<url>https://repo.huaweicloud.com/repository/maven/huaweicloudsdk/</url>
- <releases>
- <enabled>true</enabled>
- </releases>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- </repository>
- </repositories>
-</profile>
-```
-In `mirrors` element, the content below should be added:
-```xml
-<mirror>
- <id>RepoMirror</id>
- <mirrorOf>*,!SDK</mirrorOf>
- <url>https://repo.huaweicloud.com/repository/maven/</url>
-</mirror>
-```
-Add `activeProfiles` element as below:
-```xml
-<activeProfiles>
- <activeProfile>MyProfile</activeProfile>
-</activeProfiles>
-```
-
-g. Verification
-
-Use the mvn -version command to verify that the installation is successful.
The windows environment is echoed as follows:
-
-```
-C:\>mvn -version
- Apache Maven 3.3.9
-```
+* Download the Maven installation package at the official address.
+* Unzip the Maven installation package to the native path.
+* Set environment variables:
+ * Set the M2\_HOME environment variable to point to the Maven installation
directory.
+ * Add %M2\_HOME%\bin to the system path path.
+* Verification
+
+ Use the mvn -version command to verify that the installation is successful.
The windows environment
+ is echoed as follows:
+
+ C:\>mvn -version
+ Apache Maven 3.3.9
## Eclipse installation
diff --git a/java-chassis-reference/zh_CN/docs/references-handlers/ratelimit.md
b/java-chassis-reference/zh_CN/docs/references-handlers/ratelimit.md
index c80ddd8..5de7443 100644
--- a/java-chassis-reference/zh_CN/docs/references-handlers/ratelimit.md
+++ b/java-chassis-reference/zh_CN/docs/references-handlers/ratelimit.md
@@ -12,14 +12,17 @@ java-chassis 支持 Provider 限流和 Consumer 限流。 Provider 限流控制
## 流控算法说明
2.1.3 版本之前,不提供流控策略的选择,默认流控实现算法是固定窗口算法。
+
2.1.3 版本以及之后,提供流控测流供选择,默认提供固定窗口算法、漏桶算法、令牌桶算法,且支持用户自定义流控策略实现。
-算法说明:
- * 固定窗口算法:默认窗口大小为1s,最大可能产生2倍于指定流量设置大小的误差。
- *
令牌桶算法:令牌桶的主要思想是,设置一个固定大小的桶,以恒定速率向里面加入令牌,每次新请求到来时从里面取一个令牌出来,如果没有令牌可取,则请求直接失败(被限流)。
- * 漏桶算法:漏桶算法的主要思想是,设置一个固定大小的桶,请求不断加入桶中同时以固定大小从桶内部流出,如果达到桶的极限大小,则请求溢出(失败)。
- 在内部实现上漏桶算法与令牌桶算法的实现原理相同,根据设置的桶大小不同,能承载的突发流量不同。
- * 用户自定义流控算法:可以参考 [示例实现][customize-flow] ,以及该实现下的配置方法。
+* 算法说明:
+ * 固定窗口算法:默认窗口大小为1s,最大可能产生2倍于指定流量设置大小的误差。
+ * 令牌桶算法:令牌桶的主要思想是,设置一个固定大小的桶,以恒定速率向里面加入令牌,每次新
+ 请求到来时从里面取一个令牌出来,如果没有令牌可取,则请求直接失败(被限流)。
+ * 漏桶算法:漏桶算法的主要思想是,设置一个固定大小的桶,请求不断加入桶中同时以固定大小从桶
+ 内部流出,如果达到桶的极限大小,则请求溢出(失败)。在内部实现上漏桶算法与令牌桶算法的实现
+ 原理相同,根据设置的桶大小不同,能承载的突发流量不同。
+ * 用户自定义流控算法:可以参考 [示例实现][customize-flow] ,以及该实现下的配置方法。
[customize-flow]:
https://github.com/apache/servicecomb-java-chassis/blob/master/demo/demo-springmvc/springmvc-server/src/main/java/org/apache/servicecomb/demo/springmvc/server/MyStrategyFactory.java
diff --git a/java-chassis-reference/zh_CN/docs/start/development-environment.md
b/java-chassis-reference/zh_CN/docs/start/development-environment.md
index 519df3b..454710d 100644
--- a/java-chassis-reference/zh_CN/docs/start/development-environment.md
+++ b/java-chassis-reference/zh_CN/docs/start/development-environment.md
@@ -37,65 +37,18 @@ JDK已经安装成功。
### **安装步骤**
-a.在官方地址下载Maven安装包。
+* 在官方地址下载Maven安装包。
+* 解压Maven安装包到本机路径。
+* 设置环境变量:
+ * 设置M2\_HOME环境变量,指向Maven安装目录。
+ * 将%M2\_HOME%\bin添加到系统路径path中。
+* 结果验证
+
+ 使用mvn -version命令验证是否安装成功,windows环境下回显如下:
+
+ C:\>mvn -version
+ Apache Maven 3.3.9
-b.(可选)在官方地址下载Eclipse插件m2eclipse。最新的Eclipse版本中带有Maven插件,则不用下载此插件
-
-c.解压Maven安装包到本机路径。
-
-d.设置环境变量。
-
-* 设置M2\_HOME环境变量,指向Maven安装目录。
-
-* 将%M2\_HOME%\bin添加到系统路径path中。
-
-e.(可选)设置本地仓库路径,用于保存从远程仓库获取的插件和依赖的副本。
-
-这里以路径D:\maven\repository为例。在/conf中找到settings.xml文件,设置localRepository为D:\maven\repository
-
-f. (可选)要想项目能够快速的下载各种依赖,建议配置一下maven仓库地址。
-
-在`profiles`中增加如下配置:
-```xml
-<profile>
- <id>MyProfile</id>
- <repositories>
- <repository>
- <id>SDK</id>
-
<url>https://repo.huaweicloud.com/repository/maven/huaweicloudsdk/</url>
- <releases>
- <enabled>true</enabled>
- </releases>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- </repository>
- </repositories>
-</profile>
-```
-在`mirrors`节点中增加如下配置:
-```xml
-<mirror>
- <id>RepoMirror</id>
- <mirrorOf>*,!SDK</mirrorOf>
- <url>https://repo.huaweicloud.com/repository/maven/</url>
-</mirror>
-```
-新增`activeProfiles`配置:
-```xml
-<activeProfiles>
- <activeProfile>MyProfile</activeProfile>
-</activeProfiles>
-```
-
-g.结果验证
-
-使用mvn -version命令验证是否安装成功,windows环境下回显如下:
-
-```
-C:\>mvn -version
- Apache Maven 3.3.9
-```
## Eclipse安装