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
yourSpringApplication |-src |-main |-resources |-application.properties
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.
Leave a Reply