--如何打包springboot
linux 下启动springboot项目
1. 打包命令 mvn clean package -P test(pom中要设置启动类)
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<mainClass>springboot启动类的类限定名</mainClass>
</configuration>
</plugin>
</plugins>
</build>
2.将jar包导入linux下并使用命令
2.1 nohup java -jar xxxxx.jar > nohup.out 2>&1 &2.2 nohup java -jar server-0.0.1-SNAPSHOT.jar >log.log &
2.3 nohup python3 xxx.py > nohup.out 2>&1 &
2.4 nohup java -Xms4096m -Xmx7168m -jar xxxx.jar > nohup.out 2>&1 &
linux下关闭端口的服务
1.查看端口占用
netstat -tunlp|grep 端口号ps -ef | grep nginx
2.关闭进程
kill -9 进程号
window下关闭端口的服务
1.查看端口占用情况
netstat -ano|findstr "端口号"
2.杀死进程
taskkill /pid 进程号 -f重启linux下的环境
source /etc/profile
ant 命令
ant clean
ant develop
关于如何启动springboot项目,windows/linux强制关闭程序
最新推荐文章于 2024-05-22 17:30:35 发布