Table of Contents
Spring Boot lets you to run the same application more than once on a different port number. In this chapter, you will learn about this in detail. Note that the default port number 8080.
1. Custom Port
In the application.properties file, we can set custom port number for the property server.port
server.port = 9090
In the application.yml file, you can find as follows −
server: port: 9090
Random Port
In the application.properties file, we can set random port number for the property server.port
server.port = 0
In the application.yml file, you can find as follows −
server: port: 0
Note − If the server.port number is 0 while starting the Spring Boot application, Tomcat uses the random port number.
Related posts:
Spring Security and OpenID Connect
Java InputStream to Byte Array and ByteBuffer
Giới thiệu HATEOAS
Guide to DelayQueue
Java Program to Implement CopyOnWriteArraySet API
Hướng dẫn sử dụng Java String, StringBuffer và StringBuilder
Spring Security Form Login
Hướng dẫn Java Design Pattern – DAO
Sorting in Java
Java Program to Find the Nearest Neighbor Using K-D Tree Search
Java Program to Find All Pairs Shortest Path
Java Byte Array to InputStream
Introduction to Spring Cloud Netflix – Eureka
New Features in Java 15
Java Program to Implement Dijkstra’s Algorithm using Set
wait() and notify() Methods in Java
Java Program to Implement Meldable Heap
Vector trong Java
Spring Cloud AWS – RDS
Queue và PriorityQueue trong Java
Spring Boot - Introduction
Java Web Services – Jersey JAX-RS – REST và sử dụng REST API testing tools với Postman
Disable Spring Data Auto Configuration
Hashtable trong java
Debugging Reactive Streams in Java
Java Program to Implement Efficient O(log n) Fibonacci generator
The Spring @Controller and @RestController Annotations
Java Program to Check Multiplicability of Two Matrices
Java Program to Check whether Directed Graph is Connected using DFS
Java Program to Implement Radix Sort
Guide to Guava Table
Tiêu chuẩn coding trong Java (Coding Standards)