Preface
Sometimes when using springboot projects, you encounter such a situation. Using a project requires copying many times for testing, and there is no difference except for the different port numbers. At this time, our powerful Intellij IDEA can be implemented for us.
Implementation method
The first method
1. Click Edit Configurations in the picture, as shown in the picture
2. Unselect Single instance only
3. Start the project, demo(9000), as shown in the figure.
4. Modify the port number in the configuration file to 9001, start the project, demo(9001), as shown in the figure.
From below, you can see that the demo project has been started with 9000 and 9001 respectively.
The second method
1. Click Edit Configurations in the picture, as shown in the picture
2. Click the + sign in the upper left corner and select Spring Boot
3. Click... position, as shown in the picture
4. Select the project you want to start and click OK
5. Modify the above name to demo2
6. Start demo(9000), as shown in the figure
7. Modify the port to 9001 and start demo2, as shown in the figure
The second method is over here
Summarize
Both methods can achieve the desired results, but I personally think the first one is relatively simple. How to use it depends on your personal preference. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to everyone in time. Thank you very much for your support to Wulin.com website!