This is an automated email from the ASF dual-hosted git repository.
xiaoyu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shenyu.git
The following commit(s) were added to refs/heads/master by this push:
new f51a42bf68 [type:fix] Fix #5332 (#5338)
f51a42bf68 is described below
commit f51a42bf685ba2aacc1e37e8702de3a130d89fcf
Author: moremind <[email protected]>
AuthorDate: Tue Dec 5 23:58:47 2023 +0800
[type:fix] Fix #5332 (#5338)
Co-authored-by: xiaoyu <[email protected]>
---
.../main/java/org/apache/shenyu/web/handler/ShenyuWebHandler.java | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git
a/shenyu-web/src/main/java/org/apache/shenyu/web/handler/ShenyuWebHandler.java
b/shenyu-web/src/main/java/org/apache/shenyu/web/handler/ShenyuWebHandler.java
index 29eacc64b9..30bcad8d41 100644
---
a/shenyu-web/src/main/java/org/apache/shenyu/web/handler/ShenyuWebHandler.java
+++
b/shenyu-web/src/main/java/org/apache/shenyu/web/handler/ShenyuWebHandler.java
@@ -136,6 +136,9 @@ public final class ShenyuWebHandler implements WebHandler,
ApplicationListener<P
}
// copy new list
List<ShenyuPlugin> newPluginList = new ArrayList<>(plugins);
+
+ // Add extend plugin from pluginData or shenyu ext-lib
+ this.sourcePlugins.addAll(shenyuAddPlugins);
if (CollectionUtils.isNotEmpty(shenyuAddPlugins)) {
shenyuAddPlugins.forEach(plugin -> LOG.info("shenyu auto add
extends plugins:{}", plugin.named()));
@@ -149,6 +152,11 @@ public final class ShenyuWebHandler implements WebHandler,
ApplicationListener<P
newPluginList.set(i, updatePlugin);
}
}
+ for (int i = 0; i < this.sourcePlugins.size(); i++) {
+ if
(this.sourcePlugins.get(i).named().equals(updatePlugin.named())) {
+ this.sourcePlugins.set(i, updatePlugin);
+ }
+ }
}
}
plugins = sortPlugins(newPluginList);