This is an automated email from the ASF dual-hosted git repository.
Aias00 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 1cfa5642ac set default extPlugin path to relative path. (#5632)
1cfa5642ac is described below
commit 1cfa5642ac247e73b483e5b42998c84fd3bc9312
Author: M.G. Ting <[email protected]>
AuthorDate: Wed Sep 30 10:01:37 2026 +0800
set default extPlugin path to relative path. (#5632)
Co-authored-by: aias00 <[email protected]>
Co-authored-by: xiaoyu <[email protected]>
Co-authored-by: aias00 <[email protected]>
Co-authored-by: loongs-zhang <[email protected]>
---
shenyu-dist/shenyu-admin-dist/src/main/resources/bin/start.bat | 5 +++--
shenyu-dist/shenyu-bootstrap-dist/src/main/resources/bin/start.bat | 5 +++--
.../main/java/org/apache/shenyu/web/loader/ShenyuLoaderService.java | 4 ++++
.../java/org/apache/shenyu/web/loader/ShenyuPluginPathBuilder.java | 2 +-
4 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/shenyu-dist/shenyu-admin-dist/src/main/resources/bin/start.bat
b/shenyu-dist/shenyu-admin-dist/src/main/resources/bin/start.bat
index bb20857382..a6a681bacb 100644
--- a/shenyu-dist/shenyu-admin-dist/src/main/resources/bin/start.bat
+++ b/shenyu-dist/shenyu-admin-dist/src/main/resources/bin/start.bat
@@ -18,12 +18,13 @@
@echo off & setlocal enabledelayedexpansion
cd %~dp0
+cd ..
-set LOG_HOME=%~dp0/../logs
+set LOG_HOME=./logs
set SERVER_NAME=ShenYu-Admin
-set CLASS_PATH=".;..\conf;..\lib\*;..\ext-lib\*"
+set CLASS_PATH=".;.\conf;.\lib\*;.\ext-lib\*"
set JAVA_OPTS=-server -Xmx2g -Xms2g -Xmn1g -Xss256k -XX:+DisableExplicitGC
-XX:LargePageSizeInBytes=128m
for /f tokens^=2-5^ delims^=^" %%j in ('java -fullversion 2^>^&1') do set
"version=%%j"
diff --git a/shenyu-dist/shenyu-bootstrap-dist/src/main/resources/bin/start.bat
b/shenyu-dist/shenyu-bootstrap-dist/src/main/resources/bin/start.bat
index 188f35c7d0..c802bc1e15 100644
--- a/shenyu-dist/shenyu-bootstrap-dist/src/main/resources/bin/start.bat
+++ b/shenyu-dist/shenyu-bootstrap-dist/src/main/resources/bin/start.bat
@@ -18,12 +18,13 @@
@echo off & setlocal enabledelayedexpansion
cd %~dp0
+cd ..
-set LOG_HOME=%~dp0/../logs
+set LOG_HOME=./logs
set SERVER_NAME=ShenYu-Bootstrap
-set CLASS_PATH=".;..\conf;..\lib\*;..\ext-lib\*"
+set CLASS_PATH=".;.\conf;.\lib\*;.\ext-lib\*"
set JAVA_OPTS=-server -Xmx4g -Xms4g -Xmn1g -Xss256k -XX:+DisableExplicitGC
-XX:LargePageSizeInBytes=128m
for /f tokens^=2-5^ delims^=^" %%j in ('java -fullversion 2^>^&1') do set
"version=%%j"
diff --git
a/shenyu-web/src/main/java/org/apache/shenyu/web/loader/ShenyuLoaderService.java
b/shenyu-web/src/main/java/org/apache/shenyu/web/loader/ShenyuLoaderService.java
index 5776ec3817..bf0af766d8 100644
---
a/shenyu-web/src/main/java/org/apache/shenyu/web/loader/ShenyuLoaderService.java
+++
b/shenyu-web/src/main/java/org/apache/shenyu/web/loader/ShenyuLoaderService.java
@@ -30,6 +30,7 @@ import
org.apache.shenyu.web.loader.ShenyuExtPathPluginJarLoader.ExtPluginLoadRe
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.io.File;
import java.util.ArrayList;
import java.util.Base64;
import java.util.List;
@@ -64,6 +65,9 @@ public class ShenyuLoaderService {
this.shenyuConfig = shenyuConfig;
ExtPlugin config = shenyuConfig.getExtPlugin();
if (config.getEnabled()) {
+ File extPluginPathDir =
ShenyuPluginPathBuilder.getPluginFile(shenyuConfig.getExtPlugin().getPath());
+ LOG.info("shenyu extPlugin path: {}",
extPluginPathDir.getAbsolutePath());
+
ScheduledThreadPoolExecutor executor = new
ScheduledThreadPoolExecutor(config.getThreads(),
ShenyuThreadFactory.create("plugin-ext-loader", true));
executor.scheduleAtFixedRate(() -> loadExtOrUploadPlugins(null),
config.getScheduleDelay(), config.getScheduleTime(), TimeUnit.SECONDS);
}
diff --git
a/shenyu-web/src/main/java/org/apache/shenyu/web/loader/ShenyuPluginPathBuilder.java
b/shenyu-web/src/main/java/org/apache/shenyu/web/loader/ShenyuPluginPathBuilder.java
index 173f2b67e3..c74a2861bb 100644
---
a/shenyu-web/src/main/java/org/apache/shenyu/web/loader/ShenyuPluginPathBuilder.java
+++
b/shenyu-web/src/main/java/org/apache/shenyu/web/loader/ShenyuPluginPathBuilder.java
@@ -30,7 +30,7 @@ public final class ShenyuPluginPathBuilder {
private static final String PLUGIN_PATH = "plugin-ext";
- private static final String DEFAULT_EXT_PLUGIN_PATH = "/ext-lib/";
+ private static final String DEFAULT_EXT_PLUGIN_PATH = "ext-lib/";
private ShenyuPluginPathBuilder() {
}