Package org.springframework.boot
Class SpringBootVersion
java.lang.Object
org.springframework.boot.SpringBootVersion
Class that exposes the Spring Boot version. Fetches the
Implementation-Version
manifest attribute from the
jar file via Package.getImplementationVersion()
, falling back to locating the
jar file that contains this class and reading the Implementation-Version
attribute from its manifest.
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
- Author:
- Drummond Dawson, Hendrig Sellik, Andy Wilkinson
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
Return the full version string of the present Spring Boot codebase, ornull
if it cannot be determined.
-
Method Details
-
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:
-