Spring Boot — Tomcat Port Number | Code Factory

Custom Port

In the application.properties file, we can set custom port number for the property server.port

server.port = 8081
server: 
port: 8081

Random Port

In the application.properties file, we can set random port number for the property server.port

server.port = 0
server: 
port: 0

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store