How to change the default port in Spring Boot

Default, Spring Boot web application starts embedded web server (Tomcat, Jetty, etc.) in port 8080. And we can configure or change the port using the server.port property. Table of contents 1. application.properties 2. application.yml 3. Command Line 4. Environment Variable 5. WebServerFactoryCustomizer 6. Download Source Code 7. References P.S Tested with Spring Boot 1, 2, …

Read more

How to change Tomcat default port ?

Tomcat by default runs on port number 8080, However there is high chance get a port conflict with others program. Sometime we just need to change the Tomcat port number. Steps of changing the Tomcat Port 1) Locate server.xml in {Tomcat installation folder}\ conf \ 2) Find following similar statement <!– Define a non-SSL HTTP/1.1 …

Read more