Adding customized app data to /info
If you added Spring Boot's Actuator module to a given project, another endpoint is available: /info
. This endpoint actually returns the empty JSON document { }
. This isn't very useful. Never fear because Spring Boot makes it super simple to embed whatever you want.
Any property that starts with info.
will be scooped up and served from this endpoint. Let's add the following code to src/main/resources/application.properties
:
info.app.name=Network Manager info.app.project=Learning Spring Boot info.app.chapter=3 info.app.manuscript.raw=asciidoctor info.app.manuscript.formatted=LibreOffice info.app.manuscript.converter=https://github.com/gregturn/asciidoctor-packt
Tip
There is no fixed structure to this. You only have ...
Get Learning Spring Boot now with O’Reilly online learning.
O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.