wvp-gb28181-project/src/main/java/com/genersoft/iot/vmp/utils/GitUtil.java
2021-08-09 16:54:36 +08:00

45 lines
1.0 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package com.genersoft.iot.vmp.utils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;
/**
* 一个优秀的颓废程序猿CSDN
*/
@Component
@PropertySource(value = {"classpath:git.properties" }, ignoreResourceNotFound = true)
public class GitUtil {
@Value("${git.branch:null}")
private String branch;
@Value("${git.commit.id:null}")
private String gitCommitId;
@Value("${git.remote.origin.url:null}")
private String gitUrl;
@Value("${git.build.time:null}")
private String buildDate;
@Value("${git.commit.id.abbrev:null}")
private String commitIdShort;
public String getGitCommitId() {
return gitCommitId;
}
public String getBranch() {
return branch;
}
public String getGitUrl() {
return gitUrl;
}
public String getBuildDate() {
return buildDate;
}
public String getCommitIdShort() {
return commitIdShort;
}
}