1.

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

Answer»
  • 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 to the application.


Discussion

No Comment Found