Skip to content

Instantly share code, notes, and snippets.

@yingzhuo
Created September 26, 2019 09:21
Show Gist options
  • Save yingzhuo/7907e10181c2c449fa412bd698c5e421 to your computer and use it in GitHub Desktop.
Save yingzhuo/7907e10181c2c449fa412bd698c5e421 to your computer and use it in GitHub Desktop.
run spring boot jar as system service #spring #systemctl
[Unit]
Description=My Service
After=syslog.target
[Service]
ExecStart=/opt/java-8-home/bin/java -Xms256m -Xmx4G -Djava.security.egd=file:/dev/./urandom -Duser.timezone=Asia/Shanghai -jar /opt/playground/playground.jar --spring.profiles.active=dev --server.port=3323
SuccessExitStatus=143
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment