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 bb208573825e..a6a681bacb8b 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 188f35c7d0eb..c802bc1e154b 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 24b135de6633..2a97d208ee36 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 @@ -29,6 +29,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.io.File; import java.util.ArrayList; import java.util.Base64; import java.util.List; @@ -63,6 +64,9 @@ public ShenyuLoaderService(final ShenyuWebHandler webHandler, final CommonPlugin 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 173f2b67e3ed..c74a2861bb5b 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() { }