参考 :https://www.jb51.net/article/107238.htm 1.新建一个脚本,如startup.sh java -jar spring-boot.jar 2. 将startup.sh添加到/etc/rc.d/rc.local文件末尾 echo "/data/app/startup.sh" >> /etc/rc.d/rc.local 3.添加可执行权限 chmod +x /data/app/startup.sh chmod +x /etc/rc.d/rc.local