类 GitProperties
- java.lang.Object
- org.springframework.boot.info.InfoProperties
- org.springframework.boot.info.GitProperties
- 所有已实现的接口:
Iterable<InfoProperties.Entry>
public class GitProperties extends InfoProperties
Provide git-related information such as commit id and time.- 从以下版本开始:
- 1.4.0
嵌套类概要
从类继承的嵌套类/接口 org.springframework.boot.info.InfoProperties
InfoProperties.Entry
构造器概要
构造器 构造器 说明 GitProperties(Properties entries)
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 String
getBranch()
Return the name of the branch ornull
.String
getCommitId()
Return the full id of the commit ornull
.Date
getCommitTime()
Return the timestamp of the commit ornull
.String
getShortCommitId()
Return the abbreviated id of the commit ornull
.从类继承的方法 org.springframework.boot.info.InfoProperties
get, getDate, iterator, toPropertySource
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 java.lang.Iterable
forEach, spliterator
构造器详细资料
GitProperties
public GitProperties(Properties entries)
方法详细资料
getCommitId
public String getCommitId()
Return the full id of the commit ornull
.- 返回:
- the full commit id
getShortCommitId
public String getShortCommitId()
Return the abbreviated id of the commit ornull
.- 返回:
- the short commit id
getCommitTime
public Date 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.- 返回:
- the commit time
- 另请参阅:
InfoProperties.get(String)