安装nodejs
通过npm安装pm2
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