org.springframework.boot.info

Class BuildProperties

  • All Implemented Interfaces:
    java.lang.Iterable<InfoProperties.Entry>


    public class BuildProperties
    extends InfoProperties
    Provide build-related information such as group and artifact.
    Since:
    1.4.0
    • Constructor Summary

      Constructors 
      Constructor and Description
      BuildProperties(java.util.Properties entries)
      Create an instance with the specified entries.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String getArtifact()
      Return the artifactId of the project or null.
      java.lang.String getGroup()
      Return the groupId of the project or null.
      java.lang.String getName()
      Return the name of the project or null.
      java.time.Instant getTime()
      Return the timestamp of the build or null.
      java.lang.String getVersion()
      Return the version of the project or null.
      • 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(java.util.Properties entries)
        Create an instance with the specified entries.
        Parameters:
        entries - the information to expose
    • Method Detail

      • getGroup

        public java.lang.String getGroup()
        Return the groupId of the project or null.
        Returns:
        the group
      • getArtifact

        public java.lang.String getArtifact()
        Return the artifactId of the project or null.
        Returns:
        the artifact
      • getName

        public java.lang.String getName()
        Return the name of the project or null.
        Returns:
        the name
      • getVersion

        public java.lang.String getVersion()
        Return the version of the project or null.
        Returns:
        the version
      • getTime

        public java.time.Instant getTime()
        Return the timestamp of the build or null.

        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)