A
A
allienn2021-09-02 14:51:54
Java
allienn, 2021-09-02 14:51:54

What is the easiest way to raise multiple local application instances for debugging/testing?

Good afternoon ! I am developing a REST service. Stack: SpringBoot, Gradle. For debugging / testing purposes, I want to have several application instances locally raised on different ports and with different settings. Is it easier to do it with help? Thank you !

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Dmitry Roo, 2021-09-02
@allienne

With the help of docker

B
BorLaze, 2021-09-02
@BorLaze

  • create a separate directory (for simplicity)
  • in the directory you make a link to your jar (so as not to copy it every time)
  • next to the link you create several files application-p1.properties, application-p2.properties, ..., application-pN.properties, with the necessary settings
  • you run several instances, each with its own profilejava -jar ZZZ.jar --spring.profiles.active=pX

D
Drno, 2021-09-02
@Drno

docker or virtual machines

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question