Home >Java >javaTutorial >How Do I Change the Port for My Spring Boot Application?
Configuring the Port for a Spring Boot Application
Spring Boot applications listen on the default port 8080, but there may be instances where you need to configure a different port. This article explores how to modify the port setting for your Spring Boot application.
Configuring the Port
To configure the port, you can set the server.port property. There are multiple ways to do this:
server.port=8090
server: port: 8090
Using a Random Port
If you want the application to listen on a random port, use server.port=0:
server.port=0
Additional Notes
The above is the detailed content of How Do I Change the Port for My Spring Boot Application?. For more information, please follow other related articles on the PHP Chinese website!