0 votes
in Spring by
Can we change the default port of the embedded Tomcat server in Spring boot?

1 Answer

0 votes
by

Yes, we can change it by using the application properties file by adding a property of server.port and assigning it to any port you wish to.

For example, if you want the port to be 8081, then you have to mention server.port=8081. Once the port number is mentioned, the application properties file will be automatically loaded by Spring Boot and the specified configurations will be applied on to the application.

Related questions

0 votes
asked Apr 4, 2021 in Spring by Robindeniel
0 votes
asked Apr 4, 2021 in Spring by Robindeniel
...