Table of contents
1. IDEA version
Different versions may have different settings, but the implementation principles are the same.
2. Implementation ideas
Starting the SpringBoot project is actually starting service containers such as Tomcat. Starting Tomcat requires a communication port. As long as the port is different, multiple service instances can be started, and then configure multiple SpringBoot applications through the Edit Configurations of the Idea tool to set different ports. .
3. Implementation process
1. Configure the SpringBoot service plug-in (you can skip it if you have already configured it)
Add SpringBoot plugin
After configuring and starting, you can see it here
2. Edit Configurations of the Idea tool configures multiple SpringBoot applications
2. Set the JVM startup parameters to specify the port used to start Tomcat
// 设置使用随机端口,也可以自己指定
-Dserver.port=0