Package org.springframework.boot.info
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
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.boot.info.InfoProperties
InfoProperties.Entry
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturn the name of the branch ornull
.Return the full id of the commit ornull
.Return the timestamp of the commit ornull
.Return the abbreviated id of the commit ornull
.Methods inherited from class org.springframework.boot.info.InfoProperties
get, getInstant, iterator, toPropertySource
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
GitProperties
-
-
Method Details
-
getBranch
Return the name of the branch ornull
.- Returns:
- the branch
-
getCommitId
Return the full id of the commit ornull
.- Returns:
- the full commit id
-
getShortCommitId
Return the abbreviated id of the commit ornull
.- Returns:
- the short commit id
-
getCommitTime
Return the timestamp of the commit ornull
.If the original value could not be parsed properly, it is still available with the
commit.time
key.- Returns:
- the commit time
- See Also:
-