spring-boot

Spring boot run multiple instances of same profile in service


In Spring boot application, how run multiple instances of same profile on same server (OS)?


Solution

  • To run multiple instances of same profile of service

    java -jar -Dserver.port=7012 -Dspring.profiles.active=production demo-0.0.1-SNAPSHOT.jar

    java -jar -Dserver.port=7011 -Dspring.profiles.active=production demo-0.0.1-SNAPSHOT.jar