spring-core是spring一系列框架的基本工具包,其中主要包括几类工具:字节码增强、访问注解、数据类型转换等。
package说明:
org.springframework.asm:字节码增强工具asm
org.springframework.cglib:字节码增强工具cglib
org.springframework.core:
org.springframework.core.annotation:方便访问注解的工具
org.springframework.core.convert:数据类型转换工具
org.springframework.core.enums:在jdk5之前,spring自己实现的枚举功能。目前已弃用。org.springframework.core.env:系统环境(jdk环境参数:System.getProperties()、System.getenv())
org.springframework.core.io:访问资源(主要是文件系统,也有字节流、jboss VFS)的工具
org.springframework.core.serializer:java对象的字节流序列化和反序列化工具
org.springframework.core.style:用来控制java对象输出为string的string风格
org.springframework.core.task:封装了一套同步和异步执行任务的executor。(没有使用线程池)
org.springframework.core.type:访问class meta的工具
org.springframework.util:其他工具,与core包不同的是,这个包的工具可以独立于spring框架而存在;而core工具主要还是为spring框架所用,与spring结合比较紧密。
------------------------org.springframework.core.annotation-------------------------
AnnotationAttributes本质上是一个Map<String, Object>集合,继承LinkedHashMap,用于保存某个注解实例的全部属性(属性名和对应的属性值)。
OrderComparator,是Ordered对象的比较器,对外提供了两个静态的排序方法public static void sort(List<?> list)、public static void sort(Object[] array)。
AnnotationAwareOrderComparator 是对OrderComparator的增强(继承),可以对Ordered对象、使用@Order