Package org.springframework.boot.info
Class BuildProperties
- java.lang.Object
- org.springframework.boot.info.InfoProperties
- org.springframework.boot.info.BuildProperties
- All Implemented Interfaces:
Iterable<InfoProperties.Entry>
public class BuildProperties extends InfoProperties
Provide build-related information such as group and artifact.- Since:
- 1.4.0
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.boot.info.InfoProperties
InfoProperties.Entry
Constructor Summary
Constructors Constructor Description BuildProperties(Properties entries)
Create an instance with the specified entries.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getArtifact()
Return the artifactId of the project ornull
.String
getGroup()
Return the groupId of the project ornull
.String
getName()
Return the name of the project ornull
.Instant
getTime()
Return the timestamp of the build ornull
.String
getVersion()
Return the version of the project 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 Detail
BuildProperties
public BuildProperties(Properties entries)
Create an instance with the specified entries.- Parameters:
entries
- the information to expose
Method Detail
getArtifact
public String getArtifact()
Return the artifactId of the project ornull
.- Returns:
- the artifact
getVersion
public String getVersion()
Return the version of the project ornull
.- Returns:
- the version
getTime
public Instant getTime()
Return the timestamp of the build ornull
.If the original value could not be parsed properly, it is still available with the
time
key.- Returns:
- the build time
- See Also:
InfoProperties.get(String)