Change the Server Port that a Spring Boot App is running on

Change the Server Port that a Spring Boot App is running on

Learn how to change the server port that a spring boot application is running on.

Introduction

In this short tutorial, we'll learn how to change the port number that the Spring Boot application is running on.

Application Properties File

One the applications.properties file and add the following:

# Change the port number that Spring Boot Application is running on.
server.port=5555

This will make the Spring Boot App run on port 5555.

Application Yaml File

One the application.yml file and add the following:

# Change the port number that Spring Boot Application is running on.
server
  port : 4444

This will make the Spring Boot App run on port 4444.

Did you like it? Why don't you try also...

Fill Java Array With The Same Values

Fill Java Array With The Same Values

Learn How To Fill a Java Array With All The Same Values.

Java How to Remove the First Character from a String.

Java How to Remove the First Character from a String.

Learn How to Remove the First Character From a String.

Java How to Remove the Last Character from a String.

Java How to Remove the Last Character from a String.

Learn How to Remove the Last Character From a String.