启动jar的方式

时间:2022-11-06 19:31:10

1.windows server 2008

start "srvRegistry" java -jar srvRegistry-1.0-SNAPSHOT.jar --spring.profiles.active=test

start "apiGetway" java -jar apiGetway-1.0-SNAPSHOT.jar --spring.profiles.active=test

2.linux

#!/bin/sh
echo "set up srvRegistry..."
nohup java -Xms512m -Xmx1024m -jar srvRegistry-1.0-SNAPSHOT.jar --spring.profiles.active=run &
sleep 10

echo "set up apiGetway..."
nohup java -Xms512m -Xmx1024m -jar apiGetway-1.0-SNAPSHOT.jar --spring.profiles.active=run &