SpringBoot專案快速啟動停止指令碼

2022-06-28 23:48:15 字數 814 閱讀 4100

springboot專案快速啟動停止指令碼

#!/bin/bash

then

echo "please check that this script and your jar-package is in the same directory!"exit 1fi

killforceflag=$2function start()

function stop()

function status()

function restart()

doecho -n "$i "sleep 1done

echo 0start

}function usage()

"echo "example: $0 start"exit 1}

case $1in

start)

start;;

stop)

stop;;

restart)

restart;;

status)

status;;

*)usage;;

esac

2.使用說明

然後就可以執行指令碼,命令如下

命令作用

啟動應用

關閉應用

重啟應用

檢視應用狀態

強制kill應用程序

注意,重新發布應用時,先stop再上傳替換jar包哦。

56行: for i in

這裡是設定restart的時候等待的時間,因為有的專案在3秒之內可能沒有辦法正常停止,所以可以調整為5秒,保證應用確實正常停止後再啟動

TLog快速接入SpringBoot專案

tlog具有以下特性 tlog支援了springboot的自動裝配,在springboot環境下,只需要以下兩步就可以接入!依賴 com.yomahubgroupid tlog all spring boot starterartifactid 1.0.0version dependency 目前j...

IDEA快速搭建SpringBoot專案

spring官網 springboot是什麼?使用spring開發變的越來越笨重,大量的xml檔案,繁瑣的配置,複雜的部署流程,整合第三方技術時難度大等,導致開發效率低下 springboot是乙個用來簡化spring應用的初始化建立和開發的框架,簡化配置,實現快速開發 為什麼使用springboo...

springboot專案啟動日誌自定義啟動標誌字元

先上圖 佛祖保佑 永無bug success就是專案啟動的時候 讓輸出的日誌可以自定義 很簡單在resources下面新建乙個banner.txt 裡面寫上你想列印出來的文字或圖案就可以 比如 具體的字型或圖案 我推薦幾個 這個是我一直在用的 裡面有不同的樣式字型 這個不知道為什麼轉完之後在我電腦上...