In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "how to realize the start-up and stop of project business by springboot main". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Next let the editor to take you to learn "springboot main how to achieve the project business start-up and stop" bar!
I. springboot main project starts to run the implementation script
#! / bin/bashPATH_LIB=./libCLASSPATH=./etcJVM_PARAM='-Xms1g-Xmx1g-Xmn128m-Xss1m'RUN_MAIN=com.ds.shorter.HttpShortMainSERVER_NAME=http-shortSERVER_PORT=39020for jar in `ls $PATH_LIB/* .jar`do CLASSPATH= "$CLASSPATH:"$jar" doneexec-a $SERVER_NAME java-server $JVM_PARAM $ARGS-classpath "$CLASSPATH" $RUN_MAIN $SERVER_PORT
2. Springboot main project service backend settings to run implementation scripts
Nohup. / server.sh > null 2 > & 1 &
III. The springboot main project business service stops running the implementation script at the backend
#! / bin/bashecho "Input process name first" NAME='RpcUserMain'echo $NAMEPID= `ps-ef | grep "$NAME" | grep-v "grep" | awk'{print $2} '`echo "PDI = [$PID] -" if [$?-eq 0]; then echo "process id:$PID" else echo "process $NAME not exit" exitfikill-9 ${PID} if [$?-eq 0] Then echo "kill $NAME success" else echo "kill $NAME fail" fiecho "PDI = [$PID]-end-" so far, I believe you have a deeper understanding of "how to achieve project business start-up and stop". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.