From 24b1aa37618877aea6cbc74e8c6afb3e473e9a62 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Mon, 31 May 2021 12:08:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0bat=E8=84=9A=E6=9C=AC?= =?UTF-8?q?=E6=89=A7=E8=A1=8C=E5=BA=94=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/SysDictDataServiceImpl.java | 4 +- .../service/impl/SysDictTypeServiceImpl.java | 4 +- ry.bat | 67 +++++++++++++++++++ ry.sh | 10 ++- 4 files changed, 78 insertions(+), 7 deletions(-) create mode 100644 ry.bat diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictDataServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictDataServiceImpl.java index b92c261e1..9239be405 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictDataServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictDataServiceImpl.java @@ -79,7 +79,7 @@ public class SysDictDataServiceImpl implements ISysDictDataService /** * 新增保存字典数据信息 * - * @param dictData 字典数据信息 + * @param data 字典数据信息 * @return 结果 */ @Override @@ -97,7 +97,7 @@ public class SysDictDataServiceImpl implements ISysDictDataService /** * 修改保存字典数据信息 * - * @param dictData 字典数据信息 + * @param data 字典数据信息 * @return 结果 */ @Override diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictTypeServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictTypeServiceImpl.java index 4d66453a6..24ca51aba 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictTypeServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictTypeServiceImpl.java @@ -166,7 +166,7 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService /** * 新增保存字典类型信息 * - * @param dictType 字典类型信息 + * @param dict 字典类型信息 * @return 结果 */ @Override @@ -183,7 +183,7 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService /** * 修改保存字典类型信息 * - * @param dictType 字典类型信息 + * @param dict 字典类型信息 * @return 结果 */ @Override diff --git a/ry.bat b/ry.bat new file mode 100644 index 000000000..5de3e1503 --- /dev/null +++ b/ry.bat @@ -0,0 +1,67 @@ +@echo off + +rem jarƽĿ¼ +set AppName=ruoyi-admin.jar + +rem JVM +set JVM_OPTS="-Dname=%AppName% -Duser.timezone=Asia/Shanghai -Xms512M -Xmx512M -XX:PermSize=256M -XX:MaxPermSize=512M -XX:+HeapDumpOnOutOfMemoryError -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:NewRatio=1 -XX:SurvivorRatio=30 -XX:+UseParallelGC -XX:+UseParallelOldGC" + + +ECHO. + ECHO. [1] %AppName% + ECHO. [2] ر%AppName% + ECHO. [3] %AppName% + ECHO. [4] ״̬ %AppName% + ECHO. [5] +ECHO. + +ECHO.ѡĿ: +set /p ID= + IF "%id%"=="1" GOTO start + IF "%id%"=="2" GOTO stop + IF "%id%"=="3" GOTO restart + IF "%id%"=="4" GOTO status + IF "%id%"=="5" EXIT +PAUSE +:start + for /f "usebackq tokens=1-2" %%a in (`jps -l ^| findstr %AppName%`) do ( + set pid=%%a + set image_name=%%b + ) + if defined pid ( + echo %%is running + PAUSE + ) + +start javaw -jar %JAVA_OPTS% ruoyi-admin.jar + +echo starting +echo Start %AppName% success... +goto:eof + +rem stopͨjpspid +:stop + for /f "usebackq tokens=1-2" %%a in (`jps -l ^| findstr %AppName%`) do ( + set pid=%%a + set image_name=%%b + ) + if not defined pid (echo process %AppName% does not exists) else ( + echo prepare to kill %image_name% + echo start kill %pid% ... + rem ݽIDkill + taskkill /f /pid %pid% + ) +goto:eof +:restart + call :stop + call :start +goto:eof +:status + for /f "usebackq tokens=1-2" %%a in (`jps -l ^| findstr %AppName%`) do ( + set pid=%%a + set image_name=%%b + ) + if not defined pid (echo process %AppName% is dead ) else ( + echo %image_name% is running + ) +goto:eof \ No newline at end of file diff --git a/ry.sh b/ry.sh index ecf7a5f35..bec5de488 100644 --- a/ry.sh +++ b/ry.sh @@ -1,8 +1,12 @@ -#!/bin/bash - +#!/bin/sh +# author ruoyi +# ./ry.sh start 启动 +# ./ry.sh stop 停止 +# ./ry.sh restart 重启 +# ./ry.sh start 状态 AppName=ruoyi-admin.jar -#JVM参数 +# JVM参数 JVM_OPTS="-Dname=$AppName -Duser.timezone=Asia/Shanghai -Xms512M -Xmx512M -XX:PermSize=256M -XX:MaxPermSize=512M -XX:+HeapDumpOnOutOfMemoryError -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:NewRatio=1 -XX:SurvivorRatio=30 -XX:+UseParallelGC -XX:+UseParallelOldGC" APP_HOME=`pwd` LOG_PATH=$APP_HOME/logs/$AppName.log