Class GitProperties

java.lang.Object
org.springframework.boot.info.InfoProperties
org.springframework.boot.info.GitProperties
All Implemented Interfaces:
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.
Since:
1.4.0
  • Constructor Details

    • GitProperties

      public GitProperties(Properties entries)
  • Method Details

    • getBranch

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

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

      public String getShortCommitId()
      Return the abbreviated id of the commit or null.
      Returns:
      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.

      Returns:
      the commit time
      See Also: