DEV Community

Cover image for Documents Spring Boot actuator endpoint with OpenApi
Michèle for opt-nc

Posted on Edited on

Documents Spring Boot actuator endpoint with OpenApi

In my previous post, I shown how to create a custom Spring Boot actuator endpoint. It could be useful to have pretty web interface to document these endpoints and allow other people to easily access your api in a pretty way. You know, I'm a girl, I like pretty things ;)

So, I chosen to use OpenApi which is usually easy to use, usually... In fact, by default, actuator endpoint are not shown with OpenApi, and it was hard to find how to do. That's why I decide to write this small post.

First of all, you'll need this dependencies :

    implementation group: 'org.springdoc', name: 'springdoc-openapi-ui', version: '1.5.0'
    implementation group: 'org.springdoc', name: 'springdoc-openapi-data-rest', version: '1.5.0'
🔴 Hot News: optnc/documents spring boot actuator endpoint with openapi hnf - Kapook Update 2025 🔴 Hot News: optnc/documents spring boot actuator endpoint with openapi hnf - Kapook Update 2025

Then, you just need to add these properties...

springdoc:
  show-actuator: true
🔴 Hot News: optnc/documents spring boot actuator endpoint with openapi hnf - Kapook Update 2025 🔴 Hot News: optnc/documents spring boot actuator endpoint with openapi hnf - Kapook Update 2025

... And you got your actuator endpoint documentation !

Alt Text

... And you can test your endpoints

Alt Text

Top comments (1)

🔴 Hot News: optnc/documents spring boot actuator endpoint with openapi hnf - Kapook Update 2025
 
adriens profile image
adriens opt-nc •

Could you put the link to your "previous post" as a href at the top of this post please ?