类 GitProperties

java.lang.Object
org.springframework.boot.info.InfoProperties
org.springframework.boot.info.GitProperties
所有已实现的接口:
Iterable<InfoProperties.Entry>

@ImportRuntimeHints(org.springframework.boot.info.GitProperties.GitPropertiesRuntimeHints.class) public class GitProperties extends InfoProperties
Provide git-related information such as commit id and time.
从以下版本开始:
1.4.0
作者:
Stephane Nicoll
  • 构造器详细资料

    • GitProperties

      public GitProperties(Properties entries)
  • 方法详细资料

    • getBranch

      public String getBranch()
      Return the name of the branch or null.
      返回:
      the branch
    • getCommitId

      public String getCommitId()
      Return the full id of the commit or null.
      返回:
      the full commit id
    • getShortCommitId

      public String getShortCommitId()
      Return the abbreviated id of the commit or null.
      返回:
      the short commit id
    • getCommitTime

      public Instant getCommitTime()
      Return the timestamp of the commit or null.

      If the original value could not be parsed properly, it is still available with the commit.time key.

      返回:
      the commit time
      另请参阅: