From 2e98b20bea4463e4465e3c19059d0744a09aec06 Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Tue, 27 Jun 2023 14:34:41 +0800
Subject: [PATCH] gb28181版本升级-补充
---
src/main/java/com/genersoft/iot/vmp/utils/GitUtil.java | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 59 insertions(+), 0 deletions(-)
diff --git a/src/main/java/com/genersoft/iot/vmp/utils/GitUtil.java b/src/main/java/com/genersoft/iot/vmp/utils/GitUtil.java
new file mode 100644
index 0000000..ca637dd
--- /dev/null
+++ b/src/main/java/com/genersoft/iot/vmp/utils/GitUtil.java
@@ -0,0 +1,59 @@
+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:}")
+ private String branch;
+ @Value("${git.commit.id:}")
+ private String gitCommitId;
+ @Value("${git.remote.origin.url:}")
+ private String gitUrl;
+ @Value("${git.build.time:}")
+ private String buildDate;
+
+ @Value("${git.build.version:}")
+ private String buildVersion;
+
+ @Value("${git.commit.id.abbrev:}")
+ private String commitIdShort;
+
+ @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;
+ }
+}
--
Gitblit v1.9.3