Package io.microsphere.spring.util
Class SpringVersionUtils
java.lang.Object
io.microsphere.spring.util.SpringVersionUtils
- All Implemented Interfaces:
io.microsphere.util.Utils
The Utilities class for Spring Framework Version
- Since:
- 1.0.0
- Author:
- Mercy
- See Also:
-
SpringVersion
SpringVersion
Version
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final io.microsphere.util.Version
The version of "spring-aop" modulestatic final String
static final io.microsphere.util.Version
The version of "spring-beans" modulestatic final io.microsphere.util.Version
The version of "spring-context-support" modulestatic final io.microsphere.util.Version
The version of "spring-context" modulestatic final io.microsphere.util.Version
The version of "spring-core" module -
Method Summary
Modifier and TypeMethodDescriptionstatic io.microsphere.util.Version
getSpringVersion
(Class<?> springClass) Get theVersion
from the Spring classstatic io.microsphere.util.Version
getSpringVersion
(String springClassName) Get theVersion
from the Spring class
-
Field Details
-
SPRING_BASE_PACKAGE_NAME
- See Also:
-
SPRING_CORE_VERSION
@Nonnull public static final io.microsphere.util.Version SPRING_CORE_VERSIONThe version of "spring-core" module -
SPRING_AOP_VERSION
@Nullable public static final io.microsphere.util.Version SPRING_AOP_VERSIONThe version of "spring-aop" module -
SPRING_BEANS_VERSION
@Nonnull public static final io.microsphere.util.Version SPRING_BEANS_VERSIONThe version of "spring-beans" module -
SPRING_CONTEXT_VERSION
@Nonnull public static final io.microsphere.util.Version SPRING_CONTEXT_VERSIONThe version of "spring-context" module -
SPRING_CONTEXT_SUPPORT_VERSION
@Nullable public static final io.microsphere.util.Version SPRING_CONTEXT_SUPPORT_VERSIONThe version of "spring-context-support" module
-
-
Method Details
-
getSpringVersion
@Nullable public static io.microsphere.util.Version getSpringVersion(String springClassName) throws NullPointerException, IllegalArgumentException Get theVersion
from the Spring class- Parameters:
springClassName
- the Spring class name- Returns:
null
of the specified class can't be found by its' name the "Implementation-Version" attribute is absent in the "META-INF/MANIFEST.MF" resource- Throws:
NullPointerException
- ifspringClass
isnull
IllegalArgumentException
- if the package name ofspringClass
does not start with "org.springframework"IllegalStateException
- if the "Implementation-Version" attribute is absent in the "META-INF/MANIFEST.MF" resource
-
getSpringVersion
@Nonnull public static io.microsphere.util.Version getSpringVersion(Class<?> springClass) throws NullPointerException, IllegalArgumentException Get theVersion
from the Spring class- Parameters:
springClass
- the Spring class- Returns:
- non-null
- Throws:
NullPointerException
- ifspringClass
isnull
IllegalArgumentException
- if the package name ofspringClass
does not start with "org.springframework"IllegalStateException
- if the "Implementation-Version" attribute is absent in the "META-INF/MANIFEST.MF" resource
-