How does IntelliJ IDEA know the port number of the running Spring Boot project?

56 views Asked by At

When using IntelliJ IDEA Ultimate, launching a Spring Boot project automatically displays the port number in the IDE.

I would like to understand the principle behind this.

enter image description here

Even when I set server.port=0 in the configuration file and turn off the output logs, IntelliJ IDEA still manages to recognize the port number. It is said online that this information is obtained from JMX. Indeed, when I disable the JMX endpoints in the IDEA run configuration, the port number is no longer recognized. However, when I use JConsole to inspect all properties of the running Spring Boot project, none of the values match the startup port number.

enter image description here

0

There are 0 answers