Top Description Constructors Methods
org.springframework.core

public final Class SpringVersion

extends Object
Class Inheritance
Imports
org.springframework.lang.Nullable

Class that exposes the Spring 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 version in all environments. Consider using a reflection-based check instead — for example, checking for the presence of a specific Spring 5.2 method that you intend to call.

Author
Juergen Hoeller
Since
1.1

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static String
getVersion()

Return the full version string of the present Spring codebase, or null if it cannot be determined.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

SpringVersionback to summary
private SpringVersion()

Method Detail

getVersionback to summary
public static String getVersion()

Return the full version string of the present Spring codebase, or null if it cannot be determined.

Annotations
@Nullable
See Also
Package#getImplementationVersion()