Pre Merge pull request !478 from lizf/v3.8.2.1
This commit is contained in:
commit
2b1b93e50e
54
bin/run.sh
Executable file
54
bin/run.sh
Executable file
@ -0,0 +1,54 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Licensed 描述
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
# -----------------------------------------------------------------------------
|
||||
# 开始 脚本 服务
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
# 解析链接- $0可能是软链接
|
||||
PRG="$0"
|
||||
|
||||
while [ -h "$PRG" ]; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`/"$link"
|
||||
fi
|
||||
done
|
||||
#echo $PRG
|
||||
|
||||
# 获取标准环境变量
|
||||
PRGDIR=`dirname "$PRG"`
|
||||
|
||||
#echo $PRG
|
||||
|
||||
PRGDIR=`dirname "$PRG"`
|
||||
EXECUTABLE=ruoyi.sh
|
||||
|
||||
#判断入口参数进行脚本执行
|
||||
case "$1" in
|
||||
|
||||
start)
|
||||
echo "Starting Ruoyi ... "
|
||||
exec "$PRGDIR"/"$EXECUTABLE" start "$@"
|
||||
|
||||
|
||||
;;
|
||||
stop)
|
||||
echo "Stoping Ruoyi ... "
|
||||
exec "$PRGDIR"/"$EXECUTABLE" stop "$@"
|
||||
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "{start|stop}"
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
111
bin/ruoyi.sh
Executable file
111
bin/ruoyi.sh
Executable file
@ -0,0 +1,111 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Licensed 描述
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
# -----------------------------------------------------------------------------
|
||||
#
|
||||
# 环境变量
|
||||
#
|
||||
# 请不要在这里设置您的变量脚本,若要设置请移步
|
||||
# setenv.sh
|
||||
#
|
||||
# RUOYI_HOME 可以指向您的“构建”目录。
|
||||
# RUOYI_BASE (可选)解析RUOYI安装的动态部分的基目录#。如果不存在,解析为# RUOYI HOME指向的相同目录。
|
||||
# JAVA_OPTS (可选)Java运行时选项,请在 setenv.sh 中设置
|
||||
# JAVA_HOME 必须指向您的Java开发工具包安装。#使用"debug"参数运行
|
||||
# JRE_HOME 必须指向您的Java运行时环境。
|
||||
# 如果为空,默认为JAVA HOME。如果同时设置JRE HOME和JAVA HOME #,则使用JRE HOME。
|
||||
# RUOYI_PID (可选)当使用时,包含RUOYI启动java进程 pid 的文件路径
|
||||
# RUOYI_CMD 执行命令字符串
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
# 解析链接- $0可能是软链接
|
||||
PRG="$0"
|
||||
|
||||
while [ -h "$PRG" ]; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`/"$link"
|
||||
fi
|
||||
done
|
||||
#echo $PRG
|
||||
|
||||
# 获取标准环境变量
|
||||
PRGDIR=`dirname "$PRG"`
|
||||
|
||||
# 设置构建目录
|
||||
[ -z "$RUOYI_HOME" ] && RUOYI_HOME=`cd "$PRGDIR/.." >/dev/null; pwd`
|
||||
|
||||
[ -z "$RUOYI_BASE" ] && RUOYI_BASE="$RUOYI_HOME"
|
||||
|
||||
#确保在启动时不使用任何用户定义的CLASSPATH变量,
|
||||
#但允许在 setenv.sh 中指定它们,在极少数情况下需要时。
|
||||
|
||||
CLASSPATH=
|
||||
|
||||
if [ -r "$RUOYI_BASE/bin/setenv.sh" ]; then
|
||||
. "$RUOYI_BASE/bin/setenv.sh"
|
||||
elif [ -r "$RUOYI_HOME/bin/setenv.sh" ]; then
|
||||
. "$RUOYI_HOME/bin/setenv.sh"
|
||||
fi
|
||||
|
||||
|
||||
# java 命令位置
|
||||
if [ -z "$JAVA_HOME" ]; then
|
||||
JAVA_BIN="`which java 2>/dev/null || type java 2>&1`"
|
||||
while [ -h "$JAVA_BIN" ]; do
|
||||
ls=`ls -ld "$JAVA_BIN"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
JAVA_BIN="$link"
|
||||
else
|
||||
JAVA_BIN="`dirname "$JAVA_BIN"`/$link"
|
||||
fi
|
||||
done
|
||||
test -x "$JAVA_BIN" && JAVA_HOME="`dirname "$JAVA_BIN"`"
|
||||
test ".$JAVA_HOME" != . && JAVA_HOME=`cd "$JAVA_HOME/.." >/dev/null; pwd`
|
||||
else
|
||||
JAVA_BIN="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
|
||||
# 设置 -pidfile
|
||||
test ".$RUOYI_PID" = . && RUOYI_PID="$RUOYI_BASE/logs/ruoyi.pid"
|
||||
LOGBACK="-Dlogback.configurationFile=file:$RUOYI_BASE/ruoyi-admin/src/main/resources/logback.xml"
|
||||
|
||||
RUOYI_CMD="nohup $JAVA_BIN -jar $RUOYI_BASE/ruoyi-admin/target/ruoyi-admin.jar $LOGBACK $JAVA_OPTS >/dev/null 2>&1 &"
|
||||
#echo $RUOYI_HOME $RUOYI_BASE $LOGBACK
|
||||
#echo $PRG $RUOYI_BASE $JAVA_OPTS $JAVA_BIN $RUOYI_PID $RUOYI_CMD
|
||||
|
||||
touch "$RUOYI_PID"
|
||||
|
||||
|
||||
#eval exec "$RUOYI_CMD"
|
||||
|
||||
|
||||
|
||||
if [ "$1" = "start" ] ; then
|
||||
PID=`cat $RUOYI_PID`
|
||||
ps -p $PID >/dev/null 2>&1
|
||||
if [ $? -eq 0 ] ; then
|
||||
echo "RuoYi appears to still be running with PID $PID. Start aborted."
|
||||
echo "If the following process is not a RuoYi process, remove the PID file and try again:"
|
||||
exit 1
|
||||
elif [ ! -z "$RUOYI_PID" ]; then
|
||||
eval exec "$RUOYI_CMD"
|
||||
echo $! > "$RUOYI_PID"
|
||||
#exit 1
|
||||
fi
|
||||
|
||||
elif [ "$1" = "stop" ] ; then
|
||||
#echo "stop"
|
||||
kill -9 `cat "$RUOYI_PID"` >/dev/null 2>&1
|
||||
|
||||
fi
|
||||
|
||||
|
35
bin/setenv.sh
Normal file
35
bin/setenv.sh
Normal file
@ -0,0 +1,35 @@
|
||||
#!/bin/sh
|
||||
# Licensed 描述
|
||||
|
||||
#
|
||||
# JAVA_HOME
|
||||
# JAVA_OPTS
|
||||
#
|
||||
# -----------------------------------------------------------------------------
|
||||
# 开始 脚本 服务
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
# 解析链接- $0可能是软链接
|
||||
PRG="$0"
|
||||
|
||||
while [ -h "$PRG" ]; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`/"$link"
|
||||
fi
|
||||
done
|
||||
#echo $PRG
|
||||
|
||||
# 获取标准环境变量
|
||||
PRGDIR=`dirname "$PRG"`
|
||||
|
||||
#echo $PRG
|
||||
|
||||
PRGDIR=`dirname "$PRG"`
|
||||
|
||||
JAVA_OPTS="-Xms256m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m"
|
||||
|
||||
|
1
pom.xml
1
pom.xml
@ -209,6 +209,7 @@
|
||||
<module>ruoyi-quartz</module>
|
||||
<module>ruoyi-generator</module>
|
||||
<module>ruoyi-common</module>
|
||||
<module>ruoyi-sql</module>
|
||||
</modules>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
|
@ -6,9 +6,9 @@ spring:
|
||||
druid:
|
||||
# 主库数据源
|
||||
master:
|
||||
url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
url: jdbc:mysql://localhost:3306/ry_vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
username: root
|
||||
password: password
|
||||
password: root
|
||||
# 从库数据源
|
||||
slave:
|
||||
# 从数据源开关/默认关闭
|
||||
|
@ -1,7 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<!-- 日志存放路径 -->
|
||||
<property name="log.path" value="/home/ruoyi/logs" />
|
||||
<!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径-->
|
||||
<springProperty scope="context" name="logPath" source="logging.path"/>
|
||||
<property name="LOG_HOME" value="${logPath}/logs" />
|
||||
<!-- 日志输出格式 -->
|
||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
|
||||
|
||||
|
90
ruoyi-sql/pom.xml
Normal file
90
ruoyi-sql/pom.xml
Normal file
@ -0,0 +1,90 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<version>3.8.2</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>ruoyi-sql</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<build>
|
||||
<plugins>
|
||||
<!--添加sql-maven-plugin插件 -->
|
||||
<plugin>
|
||||
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>sql-maven-plugin</artifactId>
|
||||
<version>1.5</version>
|
||||
<!---因为该实例中用到的数据库是mysql,故需依赖于mysql连接驱动 -->
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>5.1.27</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<!--为该插件配置数据库连接信息 -->
|
||||
<configuration>
|
||||
<driver>com.mysql.jdbc.Driver</driver>
|
||||
<url>jdbc:mysql://localhost:3306/ry_vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8</url>
|
||||
<username>root</username>
|
||||
<password>root</password>
|
||||
<autocommit>true</autocommit>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>create-data</id>
|
||||
<phase>generate-sources</phase>
|
||||
<goals>
|
||||
<goal>execute</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<autocommit>true</autocommit>
|
||||
<srcFiles>
|
||||
<srcFile>quartz.sql</srcFile>
|
||||
<srcFile>ry_20210908.sql</srcFile>
|
||||
</srcFiles>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
|
||||
<plugin>
|
||||
<groupId>org.eclipse.m2e</groupId>
|
||||
<artifactId>lifecycle-mapping</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<configuration>
|
||||
<lifecycleMappingMetadata>
|
||||
<pluginExecutions>
|
||||
<pluginExecution>
|
||||
<pluginExecutionFilter>
|
||||
<groupId>
|
||||
org.codehaus.mojo
|
||||
</groupId>
|
||||
<artifactId>
|
||||
sql-maven-plugin
|
||||
</artifactId>
|
||||
<versionRange>
|
||||
[1.5,)
|
||||
</versionRange>
|
||||
<goals>
|
||||
<goal>execute</goal>
|
||||
</goals>
|
||||
</pluginExecutionFilter>
|
||||
<action>
|
||||
<ignore></ignore>
|
||||
</action>
|
||||
</pluginExecution>
|
||||
</pluginExecutions>
|
||||
</lifecycleMappingMetadata>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
</project>
|
Loading…
x
Reference in New Issue
Block a user