Spring Boot – Change default Port

When you develop a Spring Boot Application and want to start and use it, a Tomcat Server will be started and tries to use the Port 8080. That´s the basic configuration.

In my case I´m using this Port otherwise. So my Spring Boot Application won´t start. For this I change the default port for the application as follows:

Create application.properties

Just create a application.properties file in your projects resource folder


In this file (if it didn´t existed before) just add the parameter

server.port = 8890 
#or any other port you want

So that´s all. Now start your the building of your application again, and Tomcat will use the new port as default.

So thanks for reading and have fun with this nice port changing feature and Spring Boot.

Feel free to share

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.