Closed webcane closed 1 year ago
alternative maven build-info https://docs.spring.io/spring-boot/docs/2.2.1.RELEASE/maven-plugin/examples/build-info.html
current GET http://localhost:8080/management/info
{
"build": {
"artifact": "readme-app",
"name": "readme-app",
"time": "2022-09-20T19:29:05.746Z",
"version": "1.0.0",
"group": "cane.brothers"
}
}
it could be accesable by build properties
@Autowired
BuildProperties buildProperties;
GET http://localhost:8080/management/info
{
"app": {
"url": "https://github.com/webcane/readme-app",
"name": "readme-app",
"version": "1.0.0",
"email": "@project.developers[0].email@",
"description": "Web application which holds and manages articles to read"
},
"git": {
"branch": "master",
"commit": {
"id": "4f92376",
"time": "2022-09-22T18:08:27Z"
}
},
"build": {
"artifact": "readme-app",
"name": "readme-app",
"time": "2022-09-22T18:30:00.497Z",
"version": "1.0.0",
"group": "cane.brothers"
},
"java": {
"version": "17.0.3",
"vendor": {
"name": "Homebrew",
"version": "Homebrew"
},
"runtime": {
"name": "OpenJDK Runtime Environment",
"version": "17.0.3+0"
},
"jvm": {
"name": "OpenJDK 64-Bit Server VM",
"vendor": "Homebrew",
"version": "17.0.3+0"
}
}
}
set up info app properties see https://www.callicoder.com/spring-boot-actuator/
instead of app defined