Package io.microsphere.spring.util
Class SpringVersionUtils
- java.lang.Object
-
- io.microsphere.util.BaseUtils
-
- io.microsphere.spring.util.SpringVersionUtils
-
public abstract class SpringVersionUtils extends io.microsphere.util.BaseUtils
The Utilities class for Spring Framework Version- Since:
- 1.0.0
- Author:
- Mercy
- See Also:
SpringVersion
,SpringVersion
,Version
-
-
Field Summary
Fields Modifier and Type Field Description static io.microsphere.util.Version
SPRING_AOP_VERSION
The version of "spring-aop" modulestatic java.lang.String
SPRING_BASE_PACKAGE_NAME
static io.microsphere.util.Version
SPRING_BEANS_VERSION
The version of "spring-beans" modulestatic io.microsphere.util.Version
SPRING_CONTEXT_SUPPORT_VERSION
The version of "spring-context" modulestatic io.microsphere.util.Version
SPRING_CONTEXT_VERSION
The version of "spring-context" modulestatic io.microsphere.util.Version
SPRING_CORE_VERSION
The version of "spring-core" module
-
Constructor Summary
Constructors Constructor Description SpringVersionUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static io.microsphere.util.Version
getSpringVersion(java.lang.Class<?> springClass)
Get theVersion
from the Spring classstatic io.microsphere.util.Version
getSpringVersion(java.lang.String springClassName)
Get theVersion
from the Spring class
-
-
-
Field Detail
-
SPRING_BASE_PACKAGE_NAME
public static final java.lang.String SPRING_BASE_PACKAGE_NAME
- See Also:
- Constant Field Values
-
SPRING_CORE_VERSION
@NonNull public static final io.microsphere.util.Version SPRING_CORE_VERSION
The version of "spring-core" module
-
SPRING_AOP_VERSION
@Nullable public static final io.microsphere.util.Version SPRING_AOP_VERSION
The version of "spring-aop" module
-
SPRING_BEANS_VERSION
@NonNull public static final io.microsphere.util.Version SPRING_BEANS_VERSION
The version of "spring-beans" module
-
SPRING_CONTEXT_VERSION
@NonNull public static final io.microsphere.util.Version SPRING_CONTEXT_VERSION
The version of "spring-context" module
-
SPRING_CONTEXT_SUPPORT_VERSION
@Nullable public static final io.microsphere.util.Version SPRING_CONTEXT_SUPPORT_VERSION
The version of "spring-context" module
-
-
Method Detail
-
getSpringVersion
@Nullable public static io.microsphere.util.Version getSpringVersion(java.lang.String springClassName) throws java.lang.NullPointerException, java.lang.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:
java.lang.NullPointerException
- ifspringClass
isnull
java.lang.IllegalArgumentException
- if the package name ofspringClass
does not start with "org.springframework"java.lang.IllegalStateException
- if the "Implementation-Version" attribute is absent in the "META-INF/MANIFEST.MF" resource
-
getSpringVersion
@NonNull public static io.microsphere.util.Version getSpringVersion(java.lang.Class<?> springClass) throws java.lang.NullPointerException, java.lang.IllegalArgumentException
Get theVersion
from the Spring class- Parameters:
springClass
- the Spring class- Returns:
- non-null
- Throws:
java.lang.NullPointerException
- ifspringClass
isnull
java.lang.IllegalArgumentException
- if the package name ofspringClass
does not start with "org.springframework"java.lang.IllegalStateException
- if the "Implementation-Version" attribute is absent in the "META-INF/MANIFEST.MF" resource
-
-