Skip to content

Commit 98c8733

Browse files
committed
docs(management-port): add example for /v3/api-docs and Swagger UI (#3147)
1 parent b1fd1ca commit 98c8733

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,37 @@ Snapshots:
253253
* [https://central.sonatype.com/service/rest/repository/browse/maven-snapshots/org/springdoc/](https://central.sonatype.com/service/rest/repository/browse/maven-snapshots/org/springdoc/)
254254
.
255255

256+
## Using a separate management port (Spring Boot 3)
257+
258+
Some Spring Boot apps run **Actuator** on a separate management port. In that case:
259+
260+
- **Application port** (e.g., `8080`) serves your app and springdoc endpoints:
261+
- `http://localhost:8080/v3/api-docs`
262+
- `http://localhost:8080/swagger-ui/index.html`
263+
264+
- **Management port** (e.g., `9090`) serves Actuator:
265+
- `http://localhost:9090/actuator`
266+
- `http://localhost:9090/actuator/health`
267+
268+
Minimal `application.yml`:
269+
270+
```yaml
271+
server:
272+
port: 8080
273+
274+
management:
275+
server:
276+
port: 9090
277+
endpoints:
278+
web:
279+
exposure:
280+
include: health,info
281+
282+
# springdoc is enabled by default with the starter;
283+
# endpoints remain on the application port.
284+
# (OpenAPI JSON = /v3/api-docs, Swagger UI = /swagger-ui/index.html)
285+
```
286+
256287
# Acknowledgements
257288

258289
## Contributors

0 commit comments

Comments
 (0)