maven打出jar包
1.运行命令后台挂起:并把日志打印到log.txt
nohup java -jar apiRest.jar > log.txt 2>&1&
2.部署时报错找不到主类
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
<configuration>
<includeSystemScope>true</includeSystemScope>
<mainClass>xcx.com.TestApplication</mainClass>
</configuration>
</plugin>
加入pom.xml加入
3.8080端口被占用启动报错
netstat -nlp | grep 8080
查看进程号 kill -9