Package org.springframework.boot
Class SpringBootVersion
- java.lang.Object
- org.springframework.boot.SpringBootVersion
public final class SpringBootVersion extends Object
Class that exposes the Spring Boot version. Fetches the "Implementation-Version" manifest attribute from the jar file.Note that some ClassLoaders do not expose the package metadata, hence this class might not be able to determine the Spring Boot version in all environments. Consider using a reflection-based check instead: For example, checking for the presence of a specific Spring Boot method that you intend to call.
- Since:
- 1.3.0
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
getVersion()
Return the full version string of the present Spring Boot codebase, ornull
if it cannot be determined.
Method Detail
getVersion
public static String getVersion()
Return the full version string of the present Spring Boot codebase, ornull
if it cannot be determined.- Returns:
- the version of Spring Boot or
null
- See Also:
Package.getImplementationVersion()