This commit is contained in:
六如
2024-12-23 11:45:47 +08:00
parent 3f7bb181fa
commit 12479cffd2
8 changed files with 41 additions and 2 deletions

1
.gitignore vendored
View File

@@ -1,4 +1,5 @@
target/ target/
logs/
!.mvn/wrapper/maven-wrapper.jar !.mvn/wrapper/maven-wrapper.jar
### STS ### ### STS ###

View File

@@ -45,5 +45,7 @@ cp -r ${front_source}/dist ./$target_dir
# 复制服务端资源 # 复制服务端资源
cp -r ${server_source}/target/*.jar $target_dir cp -r ${server_source}/target/*.jar $target_dir
cp -r script/* $target_dir
cp -r ${server_source}/src/main/resources/application-test.properties $target_dir
echo "服务端构建完毕,构建结果在${target_dir}文件夹下" echo "服务端构建完毕,构建结果在${target_dir}文件夹下"

View File

@@ -33,5 +33,7 @@ rm -rf ${target_dir}/*
# 复制服务端资源 # 复制服务端资源
cp -r ${server_source}/target/*.jar $target_dir cp -r ${server_source}/target/*.jar $target_dir
cp -r script/* $target_dir
cp -r ${server_source}/src/main/resources/application-test.properties $target_dir
echo "服务端构建完毕,构建结果在${target_dir}文件夹下" echo "服务端构建完毕,构建结果在${target_dir}文件夹下"

View File

@@ -45,5 +45,7 @@ cp -r ${front_source}/dist ./$target_dir
# 复制服务端资源 # 复制服务端资源
cp -r ${server_source}/target/*.jar $target_dir cp -r ${server_source}/target/*.jar $target_dir
cp -r script/* $target_dir
cp -r ${server_source}/src/main/resources/application-test.properties $target_dir
echo "服务端构建完毕,构建结果在${target_dir}文件夹下" echo "服务端构建完毕,构建结果在${target_dir}文件夹下"

21
script/startup.sh Normal file
View File

@@ -0,0 +1,21 @@
#!/bin/sh
# 执行文件名称
app_name=${1}
if [ -z "${1}" ];then
echo "未指定应用程序参数,格式:sh startup.sh xxx.jar"
exit 0
fi
echo "启动程序:${app_name}"
# 先关闭服务
pid=$(ps -ef | grep $app_name | grep -v grep | awk '{print $2}')
if [ -n "$pid" ]; then
echo "stop $app_name, pid:$pid"
kill -9 "$pid"
fi
nohup java -server -jar -Dspring.profiles.active=test -Duser.timezone=Asia/Shanghai -Xms512m -Xmx512m $app_name >/dev/null 2>&1 &

View File

@@ -41,8 +41,12 @@ mybatis.fill.com.gitee.sop.admin.common.fill.UpdateByFill=
mybatis.config-location=classpath:mybatis/mybatisConfig.xml mybatis.config-location=classpath:mybatis/mybatisConfig.xml
mybatis.mapper-locations=classpath:mybatis/mapper/*.xml mybatis.mapper-locations=classpath:mybatis/mapper/*.xml
# log level
logging.level.com.gitee.sop=info
# log path
logging.file.name=logs/sop-admin.log
# print SQL # print SQL
logging.level.com.gitee.sop.admin.dao=error logging.level.com.gitee.sop.admin.dao=error
logging.level.com.gitee.fastmybatis=info logging.level.com.gitee.fastmybatis=info
mybatis.print-sql=false mybatis.print-sql=false

View File

@@ -92,6 +92,10 @@ mybatis.config-location=classpath:mybatis/mybatisConfig.xml
# print sql, true/false # print sql, true/false
mybatis.print-sql=false mybatis.print-sql=false
# log level
logging.level.com.gitee.sop=info
# log path
logging.file.name=logs/sop-gateway.log
# print SQL # print SQL
logging.level.com.gitee.sop.gateway.dao=error logging.level.com.gitee.sop.gateway.dao=error
logging.level.com.gitee.fastmybatis=info logging.level.com.gitee.fastmybatis=info

View File

@@ -21,7 +21,10 @@ mybatis.fill.com.gitee.fastmybatis.core.support.LocalDateTimeFillUpdate=update_t
mybatis.config-location=classpath:mybatis/mybatisConfig.xml mybatis.config-location=classpath:mybatis/mybatisConfig.xml
mybatis.mapper-locations=classpath:mybatis/mapper/*.xml mybatis.mapper-locations=classpath:mybatis/mapper/*.xml
# log level
logging.level.com.gitee.sop=info
# log path
logging.file.name=logs/sop-website.log
# print SQL # print SQL
logging.level.com.gitee.sop.website.dao=error logging.level.com.gitee.sop.website.dao=error
logging.level.com.gitee.fastmybatis=info logging.level.com.gitee.fastmybatis=info