Springboot deploys Alibaba Cloud

premise:

           1. Have a cloud server

          2. A website developed using the springboot framework (I use idea to develop)

Note: In general, it is very convenient to deploy the springboot website, package it as a jar file, publish it to the cloud server, and use the command

java -jar **********.jar

That's it, the premise is that jdk is installed on the server (I am an Alibaba Cloud Linux system).

setp1. package jar

              Delete the tomcat dependency in the pom.xml file

                

     Click the package in maven projects, then a .jar file will be generated in the target in the file directory, published to the server using ftp, and the java -jar *********.jar command will be used in the same directory, Finally use ip:port/directory name to access.

Note: Remember to open the security configuration of the server (port, the server will open port 22 by default, others, such as ports 8080 and 8000, open it yourself, otherwise, you cannot access it).

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325516466&siteId=291194637