This is an automated email from the ASF dual-hosted git repository.
xiaoyu pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/shenyu-website.git
The following commit(s) were added to refs/heads/main by this push:
new 35beabc629 [type: fix] fix the problem of pathPattern (#904) (#924)
35beabc629 is described below
commit 35beabc629d93f733c463de1953e79dc6333a43a
Author: lahmxu <[email protected]>
AuthorDate: Sat Jul 1 23:12:52 2023 +0800
[type: fix] fix the problem of pathPattern (#904) (#924)
---
docs/user-guide/admin-usage/selector-and-rule.md | 34 ++++++++++-----------
.../user-guide/admin-usage/selector-and-rule.md | 12 ++++----
.../user-guide/admin-usage/selector-and-rule.md | 34 ++++++++++-----------
.../user-guide/admin-usage/selector-and-rule.md | 34 ++++++++++-----------
...r-en.png => predicate-judge-pathpattern-en.png} | Bin
...r-zh.png => predicate-judge-pathpattern-zh.png} | Bin
.../user-guide/admin-usage/selector-and-rule.md | 2 +-
.../user-guide/admin-usage/selector-and-rule.md | 2 +-
8 files changed, 59 insertions(+), 59 deletions(-)
diff --git a/docs/user-guide/admin-usage/selector-and-rule.md
b/docs/user-guide/admin-usage/selector-and-rule.md
index ba9f594249..e2ad2e058e 100644
--- a/docs/user-guide/admin-usage/selector-and-rule.md
+++ b/docs/user-guide/admin-usage/selector-and-rule.md
@@ -49,7 +49,7 @@ For example, add a selector to the `divide` plugin:
* exclude: the inverse of the method of `match`.
* startsWith: when its prefix is equal to the specified value, it
matches. In certain scenarios, `match` can be replaced (such as `/test/`
instead of `/test/**`) for better performance.
* endsWith: when its suffix is equal to the specified value, it matches.
- * pathPatter: it's an optimized version of `match`, which has better
performance than `match`, but does not support writing `**` in the middle of
the path (such as `/api/**/xxx`).
+ * pathPattern: it's an optimized version of `match`, which has better
performance than `match`, but does not support writing `**` in the middle of
the path (such as `/api/**/xxx`).
* Continued: whether the subsequent selector is still executed.
* PrintLogs: it will print the matching log with the open option enabled.
* Enable: whether to enable the plugin.
@@ -94,7 +94,7 @@ For example, add a selector to the `divide` plugin:
* exclude: Same function as `match`, flow selection is opposite.
* startsWith: when its prefix is equal to the specified value, it
matches. In certain scenarios, `match` can be replaced (such as `/test/`
instead of `/test/**`) for better performance.
* endsWith: when its suffix is equal to the specified value, it matches.
- * pathPatter: it's an optimized version of `match`, which has better
performance than `match`, but does not support writing `**` in the middle of
the path (such as `/api/**/xxx`).
+ * pathPattern: it's an optimized version of `match`, which has better
performance than `match`, but does not support writing `**` in the middle of
the path (such as `/api/**/xxx`).
* PrintLogs: it will print the matching log with the open option enabled.
@@ -310,27 +310,27 @@ Condition parameters allow you to retrieve the actual
data of the request. How t

-* `pathPatter`
+* `pathPattern`
- Like `match`, `pathPatter` supports fuzzy matching (`/**`). If your rule
conditions are sets as follows, then the request `/http/order/findById` can be
matched;
+ Like `match`, `pathPattern` supports fuzzy matching (`/**`). If your rule
conditions are sets as follows, then the request `/http/order/findById` can be
matched;
Notice: writing `**` in the middle of the path (such as `/api/**/xxx`) is
not supported!
- 
+ 
If you want to further understand conditions matching strategy, please read
the source code, the package name is
`org.apache.shenyu.plugin.base.condition.judge`:
-|Match Strategy | Class |
-|:------------------------ |:----- |
-|`match` |`MatchPredicateJudge` |
-|`=` |`EqualsPredicateJudge` |
-|`regex` |`RegexPredicateJudge` |
-|`contains` |`ContainsPredicateJudge` |
-|`TimeBefore` |`TimerBeforePredicateJudge` |
-|`TimeAfter` |`TimerAfterPredicateJudge` |
-|`exclude` |`ExcludePredicateJudge` |
-|`startsWith` |`StartsWithPredicateJudge` |
-|`endsWith` |`EndsWithPredicateJudge` |
-|`pathPatter` |`PathPatternPredicateJudge` |
+| Match Strategy | Class |
+|:---------------|:----- |
+| `match` |`MatchPredicateJudge` |
+| `=` |`EqualsPredicateJudge` |
+| `regex` |`RegexPredicateJudge` |
+| `contains` |`ContainsPredicateJudge` |
+| `TimeBefore` |`TimerBeforePredicateJudge` |
+| `TimeAfter` |`TimerAfterPredicateJudge` |
+| `exclude` |`ExcludePredicateJudge` |
+| `startsWith` |`StartsWithPredicateJudge` |
+| `endsWith` |`EndsWithPredicateJudge` |
+| `pathPattern` |`PathPatternPredicateJudge` |
The examples in this article illustrate the use of selectors and rules. The
Settings of specific conditions need to be selected according to actual
conditions.
diff --git
a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/admin-usage/selector-and-rule.md
b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/admin-usage/selector-and-rule.md
index ffdbf3084b..f3f79b26ac 100644
---
a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/admin-usage/selector-and-rule.md
+++
b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/admin-usage/selector-and-rule.md
@@ -43,7 +43,7 @@ description: 选择器和规则管理
* `exclude`: 是 `match` 方式的反选。
* `startsWith`:请求前缀等于指定的值,才能匹配。在特定场景下,可替换 `match`
(如用`/test/`来替换`/test/**`)以获得更好的性能。
* `endsWith`:请求后缀等于指定的值,才能匹配。
- * `pathPatter`:是 `match`
的优化版,性能比`match`更好,但是不支持将`**`写在path中间(如`/api/**/xxx`)。
+ * `pathPattern`:是 `match`
的优化版,性能比`match`更好,但是不支持将`**`写在path中间(如`/api/**/xxx`)。
* 继续后续选择器:后续选择器还是否执行。
* 是否开启:打开才会生效。
* 打印日志:打开时,当匹配上的时候,会打印匹配日志。
@@ -86,7 +86,7 @@ description: 选择器和规则管理
* `exclude`: 是 `match` 方式的反选。
* `startsWith`:请求前缀等于指定的值,才能匹配。在特定场景下,可替换 `match`
(如用`/test/`来替换`/test/**`)以获得更好的性能。
* `endsWith`:请求后缀等于指定的值,才能匹配。
- * `pathPatter`:是 `match`
的优化版,性能比`match`更好,但是不支持将`**`写在path中间(如`/api/**/xxx`)。
+ * `pathPattern`:是 `match`
的优化版,性能比`match`更好,但是不支持将`**`写在path中间(如`/api/**/xxx`)。
* 是否开启:打开才会生效。
* 打印日志:打开时,当匹配上的时候,才会打印匹配日志。
* 执行顺序:当多个规则的时候,执行顺序小的优先执行。
@@ -296,13 +296,13 @@ MyHeader: custom-header

-* `pathPatter`
+* `pathPattern`
- 跟 `match` 类似, `pathPatter` 支持模糊匹配(`/**`)。假如你的规则条件设置如下,那么请求
`/http/order/findById` 就可以匹配上;
+ 跟 `match` 类似, `pathPattern` 支持模糊匹配(`/**`)。假如你的规则条件设置如下,那么请求
`/http/order/findById` 就可以匹配上;
但是注意:不支持将`**`写在path中间(如`/api/**/xxx`)!
- 
+ 
如果想更深入理解条件匹配策略,请阅读相关源码,包名是`org.apache.shenyu.plugin.base.condition.judge`:
@@ -317,6 +317,6 @@ MyHeader: custom-header
|`exclude` |`ExcludePredicateJudge` |
|`startsWith` |`StartsWithPredicateJudge` |
|`endsWith` |`EndsWithPredicateJudge` |
-|`pathPatter` |`PathPatternPredicateJudge` |
+|`pathPattern` |`PathPatternPredicateJudge` |
文中的示例是为了说明选择器和规则的使用,具体条件的设置需要根据实际情况选择。
diff --git
a/i18n/zh/docusaurus-plugin-content-docs/version-2.5.0/user-guide/admin-usage/selector-and-rule.md
b/i18n/zh/docusaurus-plugin-content-docs/version-2.5.0/user-guide/admin-usage/selector-and-rule.md
index ffdbf3084b..9ef17e2f57 100644
---
a/i18n/zh/docusaurus-plugin-content-docs/version-2.5.0/user-guide/admin-usage/selector-and-rule.md
+++
b/i18n/zh/docusaurus-plugin-content-docs/version-2.5.0/user-guide/admin-usage/selector-and-rule.md
@@ -43,7 +43,7 @@ description: 选择器和规则管理
* `exclude`: 是 `match` 方式的反选。
* `startsWith`:请求前缀等于指定的值,才能匹配。在特定场景下,可替换 `match`
(如用`/test/`来替换`/test/**`)以获得更好的性能。
* `endsWith`:请求后缀等于指定的值,才能匹配。
- * `pathPatter`:是 `match`
的优化版,性能比`match`更好,但是不支持将`**`写在path中间(如`/api/**/xxx`)。
+ * `pathPattern`:是 `match`
的优化版,性能比`match`更好,但是不支持将`**`写在path中间(如`/api/**/xxx`)。
* 继续后续选择器:后续选择器还是否执行。
* 是否开启:打开才会生效。
* 打印日志:打开时,当匹配上的时候,会打印匹配日志。
@@ -86,7 +86,7 @@ description: 选择器和规则管理
* `exclude`: 是 `match` 方式的反选。
* `startsWith`:请求前缀等于指定的值,才能匹配。在特定场景下,可替换 `match`
(如用`/test/`来替换`/test/**`)以获得更好的性能。
* `endsWith`:请求后缀等于指定的值,才能匹配。
- * `pathPatter`:是 `match`
的优化版,性能比`match`更好,但是不支持将`**`写在path中间(如`/api/**/xxx`)。
+ * `pathPattern`:是 `match`
的优化版,性能比`match`更好,但是不支持将`**`写在path中间(如`/api/**/xxx`)。
* 是否开启:打开才会生效。
* 打印日志:打开时,当匹配上的时候,才会打印匹配日志。
* 执行顺序:当多个规则的时候,执行顺序小的优先执行。
@@ -296,27 +296,27 @@ MyHeader: custom-header

-* `pathPatter`
+* `pathPattern`
- 跟 `match` 类似, `pathPatter` 支持模糊匹配(`/**`)。假如你的规则条件设置如下,那么请求
`/http/order/findById` 就可以匹配上;
+ 跟 `match` 类似, `pathPattern` 支持模糊匹配(`/**`)。假如你的规则条件设置如下,那么请求
`/http/order/findById` 就可以匹配上;
但是注意:不支持将`**`写在path中间(如`/api/**/xxx`)!
- 
+ 
如果想更深入理解条件匹配策略,请阅读相关源码,包名是`org.apache.shenyu.plugin.base.condition.judge`:
-|匹配策略 | 源码类 |
-|:------------------------ |:----- |
-|`match` |`MatchPredicateJudge` |
-|`=` |`EqualsPredicateJudge` |
-|`regex` |`RegexPredicateJudge` |
-|`contains` |`ContainsPredicateJudge` |
-|`TimeBefore` |`TimerBeforePredicateJudge` |
-|`TimeAfter` |`TimerAfterPredicateJudge` |
-|`exclude` |`ExcludePredicateJudge` |
-|`startsWith` |`StartsWithPredicateJudge` |
-|`endsWith` |`EndsWithPredicateJudge` |
-|`pathPatter` |`PathPatternPredicateJudge` |
+| 匹配策略 | 源码类 |
+|:--------------|:----- |
+| `match` |`MatchPredicateJudge` |
+| `=` |`EqualsPredicateJudge` |
+| `regex` |`RegexPredicateJudge` |
+| `contains` |`ContainsPredicateJudge` |
+| `TimeBefore` |`TimerBeforePredicateJudge` |
+| `TimeAfter` |`TimerAfterPredicateJudge` |
+| `exclude` |`ExcludePredicateJudge` |
+| `startsWith` |`StartsWithPredicateJudge` |
+| `endsWith` |`EndsWithPredicateJudge` |
+| `pathPattern` |`PathPatternPredicateJudge` |
文中的示例是为了说明选择器和规则的使用,具体条件的设置需要根据实际情况选择。
diff --git
a/i18n/zh/docusaurus-plugin-content-docs/version-2.5.1/user-guide/admin-usage/selector-and-rule.md
b/i18n/zh/docusaurus-plugin-content-docs/version-2.5.1/user-guide/admin-usage/selector-and-rule.md
index ffdbf3084b..9ef17e2f57 100644
---
a/i18n/zh/docusaurus-plugin-content-docs/version-2.5.1/user-guide/admin-usage/selector-and-rule.md
+++
b/i18n/zh/docusaurus-plugin-content-docs/version-2.5.1/user-guide/admin-usage/selector-and-rule.md
@@ -43,7 +43,7 @@ description: 选择器和规则管理
* `exclude`: 是 `match` 方式的反选。
* `startsWith`:请求前缀等于指定的值,才能匹配。在特定场景下,可替换 `match`
(如用`/test/`来替换`/test/**`)以获得更好的性能。
* `endsWith`:请求后缀等于指定的值,才能匹配。
- * `pathPatter`:是 `match`
的优化版,性能比`match`更好,但是不支持将`**`写在path中间(如`/api/**/xxx`)。
+ * `pathPattern`:是 `match`
的优化版,性能比`match`更好,但是不支持将`**`写在path中间(如`/api/**/xxx`)。
* 继续后续选择器:后续选择器还是否执行。
* 是否开启:打开才会生效。
* 打印日志:打开时,当匹配上的时候,会打印匹配日志。
@@ -86,7 +86,7 @@ description: 选择器和规则管理
* `exclude`: 是 `match` 方式的反选。
* `startsWith`:请求前缀等于指定的值,才能匹配。在特定场景下,可替换 `match`
(如用`/test/`来替换`/test/**`)以获得更好的性能。
* `endsWith`:请求后缀等于指定的值,才能匹配。
- * `pathPatter`:是 `match`
的优化版,性能比`match`更好,但是不支持将`**`写在path中间(如`/api/**/xxx`)。
+ * `pathPattern`:是 `match`
的优化版,性能比`match`更好,但是不支持将`**`写在path中间(如`/api/**/xxx`)。
* 是否开启:打开才会生效。
* 打印日志:打开时,当匹配上的时候,才会打印匹配日志。
* 执行顺序:当多个规则的时候,执行顺序小的优先执行。
@@ -296,27 +296,27 @@ MyHeader: custom-header

-* `pathPatter`
+* `pathPattern`
- 跟 `match` 类似, `pathPatter` 支持模糊匹配(`/**`)。假如你的规则条件设置如下,那么请求
`/http/order/findById` 就可以匹配上;
+ 跟 `match` 类似, `pathPattern` 支持模糊匹配(`/**`)。假如你的规则条件设置如下,那么请求
`/http/order/findById` 就可以匹配上;
但是注意:不支持将`**`写在path中间(如`/api/**/xxx`)!
- 
+ 
如果想更深入理解条件匹配策略,请阅读相关源码,包名是`org.apache.shenyu.plugin.base.condition.judge`:
-|匹配策略 | 源码类 |
-|:------------------------ |:----- |
-|`match` |`MatchPredicateJudge` |
-|`=` |`EqualsPredicateJudge` |
-|`regex` |`RegexPredicateJudge` |
-|`contains` |`ContainsPredicateJudge` |
-|`TimeBefore` |`TimerBeforePredicateJudge` |
-|`TimeAfter` |`TimerAfterPredicateJudge` |
-|`exclude` |`ExcludePredicateJudge` |
-|`startsWith` |`StartsWithPredicateJudge` |
-|`endsWith` |`EndsWithPredicateJudge` |
-|`pathPatter` |`PathPatternPredicateJudge` |
+| 匹配策略 | 源码类 |
+|:--------------|:----- |
+| `match` |`MatchPredicateJudge` |
+| `=` |`EqualsPredicateJudge` |
+| `regex` |`RegexPredicateJudge` |
+| `contains` |`ContainsPredicateJudge` |
+| `TimeBefore` |`TimerBeforePredicateJudge` |
+| `TimeAfter` |`TimerAfterPredicateJudge` |
+| `exclude` |`ExcludePredicateJudge` |
+| `startsWith` |`StartsWithPredicateJudge` |
+| `endsWith` |`EndsWithPredicateJudge` |
+| `pathPattern` |`PathPatternPredicateJudge` |
文中的示例是为了说明选择器和规则的使用,具体条件的设置需要根据实际情况选择。
diff --git
a/static/img/shenyu/basicConfig/selectorRule/predicate-judge-pathpatter-en.png
b/static/img/shenyu/basicConfig/selectorRule/predicate-judge-pathpattern-en.png
similarity index 100%
rename from
static/img/shenyu/basicConfig/selectorRule/predicate-judge-pathpatter-en.png
rename to
static/img/shenyu/basicConfig/selectorRule/predicate-judge-pathpattern-en.png
diff --git
a/static/img/shenyu/basicConfig/selectorRule/predicate-judge-pathpatter-zh.png
b/static/img/shenyu/basicConfig/selectorRule/predicate-judge-pathpattern-zh.png
similarity index 100%
rename from
static/img/shenyu/basicConfig/selectorRule/predicate-judge-pathpatter-zh.png
rename to
static/img/shenyu/basicConfig/selectorRule/predicate-judge-pathpattern-zh.png
diff --git
a/versioned_docs/version-2.5.0/user-guide/admin-usage/selector-and-rule.md
b/versioned_docs/version-2.5.0/user-guide/admin-usage/selector-and-rule.md
index ba9f594249..5c2af9faa6 100644
--- a/versioned_docs/version-2.5.0/user-guide/admin-usage/selector-and-rule.md
+++ b/versioned_docs/version-2.5.0/user-guide/admin-usage/selector-and-rule.md
@@ -316,7 +316,7 @@ Condition parameters allow you to retrieve the actual data
of the request. How t
Notice: writing `**` in the middle of the path (such as `/api/**/xxx`) is
not supported!
- 
+ 
If you want to further understand conditions matching strategy, please read
the source code, the package name is
`org.apache.shenyu.plugin.base.condition.judge`:
diff --git
a/versioned_docs/version-2.5.1/user-guide/admin-usage/selector-and-rule.md
b/versioned_docs/version-2.5.1/user-guide/admin-usage/selector-and-rule.md
index ba9f594249..5c2af9faa6 100644
--- a/versioned_docs/version-2.5.1/user-guide/admin-usage/selector-and-rule.md
+++ b/versioned_docs/version-2.5.1/user-guide/admin-usage/selector-and-rule.md
@@ -316,7 +316,7 @@ Condition parameters allow you to retrieve the actual data
of the request. How t
Notice: writing `**` in the middle of the path (such as `/api/**/xxx`) is
not supported!
- 
+ 
If you want to further understand conditions matching strategy, please read
the source code, the package name is
`org.apache.shenyu.plugin.base.condition.judge`: