Skip to content

Commit

Permalink
📈 expose app info and version on actuator info endpoint using Gradle …
Browse files Browse the repository at this point in the history
…property expansion
  • Loading branch information
raksit31667 committed Aug 31, 2021
1 parent f8f285f commit 2e19e8e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
7 changes: 7 additions & 0 deletions api-service/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ buildscript {
}

apply plugin: 'org.springframework.boot'
apply plugin: 'java'
apply plugin: 'checkstyle'
apply plugin: 'pmd'
apply plugin: 'io.spring.dependency-management'
Expand Down Expand Up @@ -49,6 +50,12 @@ dependencies {
annotationProcessor 'org.projectlombok:lombok:1.18.12'
}

processResources {
filesMatching('application.yaml') {
expand(project.properties)
}
}

testSets {
integrationTest {
dirName = 'integration-test'
Expand Down
11 changes: 10 additions & 1 deletion api-service/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,13 @@ management:
include: '*'
metrics:
tags.*:
service: template
service: template

info:
application:
name: ${rootProject.name}
version: ${version}
jdk:
version: \${java.version}
spring-boot:
version: ${springBootVersion}

0 comments on commit 2e19e8e

Please sign in to comment.