We can update the server.port
property in application.properties
to change the default port in Spring Boot.
Article link https://mkyong.com/spring-boot/spring-boot-how-to-change-tomcat-port/
$ git clone https://github.com/mkyong/spring-boot.git
$ cd spring-boot-change-port
$ mvn spring-boot:run