Steps for deploying the SSM project managed by Maven and the Springboot project on the server

Deployment premise: You need to install the same local environment (JDK, mysql, Tomcat) on the server through the rpm/yum/pagoda panel.
This tutorial is quite comprehensive. You can go to Baidu. Here is a reminder: Download the corresponding Linux compression Package installation needs to configure the environment variables of the JDK, but the rpm installation and the one-click installation of the pagoda panel do not need to configure the environment variables!
1. The
idea of deploying the SSM project managed by Maven : Both the SSM project and the javaweb project need to configure their own Tomcat, so when deploying, you need to mark the project as a war package and directly place it in the webapps directory of the downloaded Tomcat on the server and then call tomcat The command in the bin directory to start tomcat, the
specific steps:
1. Open the war package
Specific analysis of the specific situation If you have a better understanding of artifacts, package it yourself, feel free
because I am Xiaobai and SSM managed by Maven The steps of project warping are as follows:
1.1. Change the packaging method in pom.xml to war, the default is jar package


1.2. Configure in pom.xml to install a war package plug-in (if you don't install it, you may report the error that WEB-INFO cannot be found)


1.3 Maven manages this first clean and then package

Insert picture description here

1.4 and then go to the target in the project directory to find

Insert picture description here

it. This is the process of hitting the war package!
2. Put it under the webapps in the server, and then call the command in the bin directory of tomcat to start tomcat. After the startup is successful, only visit the official website of 8080, which is Tomcat by default. If you visit the project you deployed, you need to be on the path Add the name of the war package, for example: http://own public network ip:8080/war package name/own homepage.

Insert picture description here

The deployment of this kind of project is like this. Next

2. Deploying the Springboot project
Springboot projects have their own Tomcat built-in and do not need the above projects, so it is troublesome to directly hit the Maven block, first clean and package into a jar, and then put the jar package on the server, (premise) You still need to have the required environment such as mysql and jdk, but the tomcat is missing) and then go to the project directory and execute java -jar xxxxx.jar on the server, and you can access the public network: port number.