diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index a505dfe..1862d18 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -51,8 +51,10 @@ jobs:
mkdir fizz-gateway-community
cp ./fizz-bootstrap/target/fizz-bootstrap-*.jar ./fizz-gateway-community/fizz-gateway-community.jar
cp ./fizz-bootstrap/target/classes/application.yml ./fizz-gateway-community/application.yml
+ cp ./fizz-bootstrap/target/classes/bootstrap.yml ./fizz-gateway-community/bootstrap.yml
cp ./fizz-bootstrap/target/classes/log4j2-spring.xml ./fizz-gateway-community/log4j2-spring.xml
cp ./fizz-bootstrap/sh/boot.sh ./fizz-gateway-community/boot.sh
+ cp ./fizz-bootstrap/sh/boot.cmd ./fizz-gateway-community/boot.cmd
zip -r ./fizz-gateway-community-${{ steps.releaseVersion.outputs.substring }}.zip ./fizz-gateway-community/*
- name: Release
uses: softprops/action-gh-release@v1
diff --git a/README.en-us.md b/README.en-us.md
index c03167d..72f2323 100644
--- a/README.en-us.md
+++ b/README.en-us.md
@@ -181,7 +181,8 @@ Installation method 1: binary package:
1. Download the latest binary package of fizz-gateway-community and upzip to a directory, modify the configuration of the configuration center, registry, and redis in the application.yml configuration file (redis configuration needs to be consistent with the management backend).
2. Modify the apollo connection and JVM memory configuration of the boot.sh script
-3. Execute `./boot.sh start` command to start the service, support start/stop/restart/status command
+3. Linux startup Execute `./boot.sh start` command to start the service, support start/stop/restart/status command
+4. Windows startup Execute `.\boot.cmd start` command to start the service, support start/stop/restart/status command
Installation method 2: source code:
diff --git a/README.md b/README.md
index 9fbf4d9..fd2835e 100644
--- a/README.md
+++ b/README.md
@@ -180,7 +180,8 @@ docker run --rm -d -p 8000:8000 \
1. 下载fizz-gateway-community的二进制安装包,解压修改application.yml配置文件里配置中心、注册中心、redis(redis配置需与管理后台一致)的配置
2. 根据需要修改boot.sh脚本的apollo连接,不使用apollo配置中心可跳过
-3. 执行 `./boot.sh start` 命令启动服务,支持 start/stop/restart/status命令
+3. Linux启动 执行 `./boot.sh start` 命令启动服务,支持 start/stop/restart/status命令
+4. Windows启动 执行`.\boot.cmd start` 命令启动服务,支持 start/stop/restart/status命令
安装方式二:源码安装:
diff --git a/fizz-bootstrap/pom.xml b/fizz-bootstrap/pom.xml
index 5d39cf8..4b11a4c 100644
--- a/fizz-bootstrap/pom.xml
+++ b/fizz-bootstrap/pom.xml
@@ -87,11 +87,13 @@
sh
boot.sh
+ boot.cmd
true
src/main/resources
application.yml
+ bootstrap.yml
log4j2-spring.xml
true
diff --git a/fizz-bootstrap/sh/boot.cmd b/fizz-bootstrap/sh/boot.cmd
new file mode 100644
index 0000000..0e6051e
--- /dev/null
+++ b/fizz-bootstrap/sh/boot.cmd
@@ -0,0 +1,69 @@
+@echo off
+
+if not exist "%JAVA_HOME%\bin\java.exe" echo Please set the JAVA_HOME variable in your environment. & EXIT /B 1
+
+setlocal enabledelayedexpansion
+
+set BASE_DIR=%~dp0
+set APOLLO_META_SERVER=http://localhost:66
+set APOLLO_ENV=prod
+set SPRING_PROFILES_ACTIVE=prod
+set APP_NAME=fizz-gateway-community
+set APP_NAME_JAR=%APP_NAME%.jar
+set APP_DEP_DIR=%BASE_DIR%
+set APP_LOG_DIR=%APP_DEP_DIR%logs
+set JAVA_CMD="%JAVA_HOME%\bin\java.exe"
+
+IF NOT EXIST "%APP_LOG_DIR%" (
+ MKDIR "%APP_LOG_DIR%"
+)
+
+if "%1" == "stop" goto stop
+if "%1" == "status" goto status
+
+if not "%1" == "start" if not "%1" == "restart" (
+ echo "Usage: %0 {start|stop|restart|status}"
+ goto end
+)
+
+rem JVM CONFIG
+set MEM_OPTS=-Xms256m -Xmx4096m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=256m
+
+set JAVA_OPTS=%MEM_OPTS% -XX:+AggressiveOpts -XX:+UseBiasedLocking -XX:+UseG1GC -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintHeapAtGC -Xloggc:"%APP_LOG_DIR%\%START_DATE_TIME%.gc" -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath="%APP_LOG_DIR%\dump.logs" -Dreactor.netty.pool.maxIdleTime=120000 -Dorg.jboss.netty.epollBugWorkaround=true
+
+if "%1" == "start" goto start
+if "%1" == "restart" goto stop
+
+:status
+for /f "tokens=1" %%i in ('jps -m ^| find /I "%APP_NAME%"') do (
+ echo "%APP_NAME_JAR% is runing"
+ goto end
+)
+echo "%APP_NAME_JAR% is not runing"
+goto end
+
+:stop
+for /f "tokens=1" %%i in ('jps -m ^| find /I "%APP_NAME%"') do (
+ goto doStop
+)
+echo "WARN:%APP_NAME_JAR% is not runing"
+if "%1" == "restart" goto start
+goto end
+
+:doStop
+echo "Stoping %APP_NAME_JAR%..."
+for /f "tokens=1" %%i in ('jps -m ^| find "%APP_NAME%"') do ( taskkill /F /PID %%i )
+if "%1" == "restart" goto start
+goto end
+
+:start
+for /f "tokens=1" %%i in ('jps -m ^| find /I "%APP_NAME%"') do (
+ echo "WARN:%APP_NAME_JAR% already started! Ignoring startup request."
+ goto end
+)
+
+echo "Starting %APP_NAME_JAR% ..."
+%JAVA_CMD% %JAVA_OPTS% -Dfile.encoding=UTF-8 -Dspring.profiles.active=%SPRING_PROFILES_ACTIVE% -Denv=%APOLLO_ENV% -Dapollo.meta=%APOLLO_META_SERVER% -Dlogging.config=log4j2-spring.xml -jar "%APP_DEP_DIR%%APP_NAME_JAR%"
+goto end
+
+:end
diff --git a/fizz-bootstrap/src/main/resources/application.yml b/fizz-bootstrap/src/main/resources/application.yml
index e9b925e..0739244 100644
--- a/fizz-bootstrap/src/main/resources/application.yml
+++ b/fizz-bootstrap/src/main/resources/application.yml
@@ -57,7 +57,7 @@ aggregate:
# need replace
password: 123456 #please input the redis password (default:123456)
# need replace
- database: 10 #please input the redis database (default:9)
+ database: 9 #please input the redis database (default:9)
proxy-webclient:
name: proxy
aggr-webclient: