修复git信息丢失, #2053
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.genersoft.iot.vmp.utils;
|
||||
|
||||
import lombok.Getter;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.PropertySource;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -7,6 +8,7 @@ import org.springframework.stereotype.Component;
|
||||
/**
|
||||
* 一个优秀的颓废程序猿(CSDN)
|
||||
*/
|
||||
@Getter
|
||||
@Component
|
||||
@PropertySource(value = {"classpath:git.properties" }, ignoreResourceNotFound = true)
|
||||
public class GitUtil {
|
||||
@@ -29,31 +31,4 @@ public class GitUtil {
|
||||
@Value("${git.commit.time:}")
|
||||
private String commitTime;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
public String getBuildVersion() {
|
||||
return buildVersion;
|
||||
}
|
||||
|
||||
public String getCommitTime() {
|
||||
return commitTime;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user