0 Star 15 Fork 7

00fly/effict-side

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

springboot-git

springboot工程操作git

输入图片说明

最新版本已支持docker镜像部署,完整的编排文件以及启动脚本见docker目录。

docker简易操作流程请参考 Docker 微服务部署入门到实践

Spring Boot Jar运行时指定Start-Class类

java -cp springboot-git-1.0.0.jar -Dloader.main=com.fly.GitApplication org.springframework.boot.loader.PropertiesLauncher

reload-jar.sh

#!/bin/bash
# get pid

pname="springboot-git-1.0.0.jar"
echo  -e  "jar-name=$pname\r\n"


get_pid(){
 pid=`ps -ef | grep $pname | grep -v grep | awk '{print $2}'`
 echo "$pid"
}

ps -ef|grep $pname

PID=$(get_pid)
if [ -z "${PID}" ] 
then
 echo -e "\r\nJava Application already stop!"
else
 echo -e '\r\nkill -9  '${PID} '\r\n'
 kill -9 ${PID}
 echo -e "Java Application is stop!"
fi

rm -rf info.log

echo -e "\r\nJava Application will startup!\r\n"
jar_path=`find .. -name $pname`

#echo "jarfile=$jar_path"

nohup java -jar $jar_path >>./info.log 2>&1 &

ps -ef|grep $pname

echo -e "\r\n======== Java Application logs ======== \r\n"
tail -f  info.log
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/00fly/effict-side.git
git@gitee.com:00fly/effict-side.git
00fly
effict-side
effict-side
master

搜索帮助