feat(deployment): 배포 식별자 엔드포인트를 추가한다
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package kr.co.vividnext.sodalive.deployment
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value
|
||||
import org.springframework.boot.actuate.endpoint.annotation.Endpoint
|
||||
import org.springframework.boot.actuate.endpoint.annotation.ReadOperation
|
||||
import org.springframework.stereotype.Component
|
||||
|
||||
@Component
|
||||
@Endpoint(id = "deployment")
|
||||
class DeploymentEndpoint(
|
||||
@Value("\${deployment.artifact-version}")
|
||||
private val artifactVersion: String,
|
||||
@Value("\${deployment.config-commit}")
|
||||
private val configCommit: String
|
||||
) {
|
||||
@ReadOperation
|
||||
fun deployment(): Map<String, String> = mapOf(
|
||||
"application_artifact_version" to artifactVersion,
|
||||
"config_commit" to configCommit
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user