创建springboot项目打包
注意安装java版本必须和打包的java版本一致
java安装
安装pm2
安装nodejs
通过npm安装pm2
配置json
pm2.json
{"name": "test01","script": "D:\\jdk-17.0.6\\bin\\java.exe","args": ["-Dfile.encoding=utf-8","-jar","api-0.0.1-SNAPSHOT.jar",],"exec_interpreter": "","exec_mode": "fork"
}
运行
pm2 start pm2.json
启动项目即可
参考
https://www.bbsmax.com/A/KE5QmgZ35L/
https://blog.csdn.net/Aria_Miazzy/article/details/103895455