I have a spring boot project and I would like to add some information for the info endpoint.
To add the spring-boot-actuator I added it to the gradle.build. Now, I want to have something like this:
{
"app" : {
"version" : "1.0.0",
"description" : "my program",
"name" : "my program",
"build-time" : "2016-04-08_06-26-53",
"build-tag" : "jenkins-infinity-sprint-5023",
"revision": "849604ec53b91d7903732f07eb3ca79c8f8dcf2b",
}
}
I want to get most of the values from a properties file which can be filled out at compilation time. My first approach is to have this:
# application.properties
info.app.description=my program
info.app.name=my program
info.app.build-time=${System.env['BUILD_ID']}
info.app.build-tag=${System.env['BUILD_TAG']}
info.app.revision=${System.env['MERCURIAL_REVISION']}
info.app.version=${version}
But the JSON response I am getting when I call to /info is this one:
{
"app": {
"build-time": "${System.env['BUILD_ID']}"
"version": "${version}"
"description": "my program"
"revision": "${System.env['MERCURIAL_REVISION']}"
"build-tag": "${System.env['BUILD_TAG']}"
"name": "my program"
}
}
First of all I don't know why the values are not substituted. What am I doing wrong?
My original idea is to fill in in the Manifest.mf file all the values I would need, do you know how to do it?