RayayChung commented on code in PR #4260:
URL: https://github.com/apache/shenyu/pull/4260#discussion_r1045367371


##########
shenyu-web/src/main/java/org/apache/shenyu/web/loader/ShenyuPluginLoader.java:
##########
@@ -106,7 +99,12 @@ public List<ShenyuLoaderResult> loadExtendPlugins(final 
String path) throws IOEx
             return Collections.emptyList();
         }
         List<ShenyuLoaderResult> results = new ArrayList<>();
+        boolean loadNewPlugin = false;
         for (File each : jarFiles) {
+            if 
(jars.stream().map(PluginJar::absolutePath).filter(StringUtils::hasText).anyMatch(p
 -> p.equals(each.getAbsolutePath()))) {

Review Comment:
   IMO, it might be a new feature. 
   When version upgrades, we can replace the previous jars with the new one. 
What's more, we should destroy the previous classes that are already loaded in 
spring context and then registered the new classes.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to