类 SpringVersionUtils


  • public abstract class SpringVersionUtils
    extends io.microsphere.util.BaseUtils
    The Utilities class for Spring Framework Version
    从以下版本开始:
    1.0.0
    作者:
    Mercy
    另请参阅:
    SpringVersion, SpringVersion, Version
    • 方法概要

      所有方法 静态方法 具体方法 
      修饰符和类型 方法 说明
      static io.microsphere.util.Version getSpringVersion​(java.lang.Class<?> springClass)
      Get the Version from the Spring class
      static io.microsphere.util.Version getSpringVersion​(java.lang.String springClassName)
      Get the Version from the Spring class
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 字段详细资料

      • SPRING_BASE_PACKAGE_NAME

        public static final java.lang.String SPRING_BASE_PACKAGE_NAME
        另请参阅:
        常量字段值
      • 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
    • 构造器详细资料

      • SpringVersionUtils

        public SpringVersionUtils()
    • 方法详细资料

      • getSpringVersion

        @Nullable
        public static io.microsphere.util.Version getSpringVersion​(java.lang.String springClassName)
                                                            throws java.lang.NullPointerException,
                                                                   java.lang.IllegalArgumentException
        Get the Version from the Spring class
        参数:
        springClassName - the Spring class name
        返回:
        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
        抛出:
        java.lang.NullPointerException - if springClass is null
        java.lang.IllegalArgumentException - if the package name of springClass 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 the Version from the Spring class
        参数:
        springClass - the Spring class
        返回:
        non-null
        抛出:
        java.lang.NullPointerException - if springClass is null
        java.lang.IllegalArgumentException - if the package name of springClass does not start with "org.springframework"
        java.lang.IllegalStateException - if the "Implementation-Version" attribute is absent in the "META-INF/MANIFEST.MF" resource