By default the port used for an application is 8080. We can configure the port by adding the details in the /src/main/resources/application.properties file.
As per the docs either set server.port as system property using command line option to jvm -Dserver.port=8090 or
In application.properties add
server.port=8090
OR for a Random port
server.port=0 //For random port use
If you are using application.yml then add
server:
port : 8090