Reputation: 86747
How can I add command line arguments correctly to a java systemd service? In the following example, -Dspring.profiles.active=test
is not taken into account. Thus the location is maybe wrong?
[Unit]
Description=Manage Java service
[Service]
WorkingDirectory=/opt/prod
ExecStart=/bin/java -Xms128m -Xmx256m -jar myapp.jar -Dspring.profiles.active=test
User=java
Type=simple
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.target
Upvotes: 0
Views: 704