How to change default port of tomcat server in spring boot?

Technology: java spring boot
AskedIn:
Topics:
Type:

You can change the port of default port of the tomcat server using the following methods:

In application.properties, add the following property

server.port=8081

or

If you are using an application.yml file for managing your properties, you can add the same property as:

server:  port : 8081