22 lines
709 B
Kotlin
22 lines
709 B
Kotlin
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
|
|
)
|
|
}
|