First of all, springboot will not introduce it here. I believe that all students who have used it will know about how to make a jar package!
Then upload the jar package to the cloud server. There are many tools, and the blogger will not explain it here!
Let's go straight to the point. . . .
Run the command: java -jar xxx.jar , and then the built-in tomcat of the springboot project is enabled. The project has been started, and you can access it next.
I feel everything is OK, but you have fallen into the pit. . .
What's going on?
When you close the current xshell command interface, accessing again will be invalid. Why? Why? Why?
This is because the built-in tomcat of springboot is also turned off.
So, what should I do?
It's actually very simple:
Use this command to start nohup java -jar xxx.jar &
nohup means no service, and permanent means no cloud server restarts;
The last & means that the log file nohup.out is generated after executing the command.
This way you can close xhell with confidence! ! !
Summarize
The above is the springboot project jar package introduced by the editor to deploy to the cloud server. I hope it will be helpful to everyone. If you have any questions, please leave me a message. The editor will reply to everyone in time!