Spring的各jar包依赖及作用详解

Spring的各jar包依赖及作用详解

基于Spring 5.0.2.RELEASE

spring-core.jar(必须有的核心jar包)

这个jar 文件包含Spring 框架基本的核心工具类。Spring 其它组件要都要使用到这个包里的类,是其它组件的基本核心,当然你也可以在自己的应用系统中使用这些工具类。

org.springframework

spring-jcl

5.0.2.RELEASE

compile

spring-jcl

spring-jcl是spring的日志框架,spring-jcl底层使用的日志框架是有优先级的优先级为:LOG4J2 级是最高的,其次是SLF4J (>=1.3)、SLF4J(<1.3)、JUL 。

根据spring-jcl中的LogAdapter可以得知,选择哪个日志框架是根据优先级来选定底层的日志框架的。

当项目里面没有其他日志框架时,默认使用Java提供的JUL(java.util.logging包)。

spring-beans.jar(IOC容器必备jar包)

这个jar文件是所有应用都要用到的,它包含访问配置文件、创建和管理bean 以及进行Inversion of Control / Dependency Injection(IoC/DI)操作相关的所有类。如果应用只需基本的IoC/DI 支持,引入spring-core.jar 及spring-beans.jar 文件就可以了。

org.springframework

spring-core

5.0.2.RELEASE

compile

spring-expression(表达式解析)

Spring Expression是Spring框架中一个强大表达式解析语言,支持在运行时动态的解析表达式给对象赋值。Spring Expression支持如下解析功能:

布尔和关系运算符,正则表达式,类表达式,访问属性、数组列表,哈希表,方法调用,关系运算,赋值,调用构造函数,Bean引用,数组构造,内联列表,三元运算符,变量,用户自定义函数,集合操作,模板化表达式。

按类型分配可以总结成以下几个类型的解析功能:

基本表达式:字面量表达式、关系,逻辑与算数运算表达式、字符串连接及截取表达式、三目运算及Elivis表达式、正则表达式、括号优先级表达式;

类相关表达式:类类型表达式、类实例化、instanceof表达式、变量定义及引用、赋值表达式、自定义函数、对象属性存取及安全导航表达式、对象方法调用、Bean引用;

集合相关表达式:内联List、内联数组、集合,字典访问、列表,字典,数组修改、集合投影、集合选择;不支持多维内联数组初始化;不支持内联字典定义;

其他表达式:模板表达式。

org.springframework

spring-core

5.0.2.RELEASE

compile

spring-tx(事务包)

为JDBC、Hibernate、JDO、JPA、Beans等提供的一致的声明式和编程式事务管理支持。

org.springframework

spring-aop

5.0.2.RELEASE

compile

true

org.springframework

spring-beans

5.0.2.RELEASE

compile

org.springframework

spring-context

5.0.2.RELEASE

compile

true

org.springframework

spring-core

5.0.2.RELEASE

compile

spring-jdbc

这个jar 文件包含对Spring 对JDBC 数据访问进行封装的所有类。

org.springframework

spring-beans

5.0.2.RELEASE

compile

org.springframework

spring-context

5.0.2.RELEASE

compile

true

org.springframework

spring-core

5.0.2.RELEASE

compile

org.springframework

spring-tx

5.0.2.RELEASE

compile

spring-aop

这个jar文件包含在应用中使用Spring 的AOP 特性时所需的类和源码级元数据支持。

使用基于AOP 的Spring特性,如声明型事务管理(Declarative Transaction Management),也要在应用里包含这个jar包。

com.jamonapi

jamon

2.81

compile

true

org.apache.commons

commons-pool2

2.4.3

compile

true

org.aspectj

aspectjweaver

1.8.13

compile

true

org.springframework

spring-beans

5.0.2.RELEASE

compile

org.springframework

spring-core

5.0.2.RELEASE

compile

spring-aspects

提供对AspectJ的支持,以便可以方便的将面向方面的功能集成进IDE中,比如Eclipse AJDT。

aspects并不依赖beans,它是aspectJ的整合包,只依赖于aspectJ。

javax.cache

cache-api

1.0.0

compile

true

javax.transaction

javax.transaction-api

1.2

compile

true

org.aspectj

aspectjweaver

1.8.13

compile

org.springframework

spring-aop

5.0.2.RELEASE

compile

true

org.springframework

spring-beans

5.0.2.RELEASE

compile

true

org.springframework

spring-context

5.0.2.RELEASE

compile

true

org.springframework

spring-context-support

5.0.2.RELEASE

compile

true

org.springframework

spring-orm

5.0.2.RELEASE

compile

true

org.springframework

spring-tx

5.0.2.RELEASE

compile

true

spring-context

这个jar 文件为Spring 核心提供了大量扩展。可以找到使用Spring ApplicationContext特性时所需的全部类,JDNI 所需的全部类,instrumentation组件以及校验Validation 方面的相关类。

javax.annotation

javax.annotation-api

1.3.1

compile

true

javax.ejb

javax.ejb-api

3.2

compile

true

javax.enterprise.concurrent

javax.enterprise.concurrent-api

1.0

compile

true

javax.inject

javax.inject

1

compile

true

javax.interceptor

javax.interceptor-api

1.2.1

compile

true

javax.money

money-api

1.0.1

compile

true

javax.validation

validation-api

1.1.0.Final

compile

true

javax.xml.ws

jaxws-api

2.3.0

compile

true

joda-time

joda-time

2.9.9

compile

true

org.aspectj

aspectjweaver

1.8.13

compile

true

org.beanshell

bsh

2.0b5

compile

true

org.codehaus.groovy

groovy-all

2.4.13

compile

true

org.hibernate

hibernate-validator

5.4.2.Final

compile

true

org.jetbrains.kotlin

kotlin-reflect

1.1.61

compile

true

org.jetbrains.kotlin

kotlin-stdlib

1.1.61

compile

true

org.springframework

spring-aop

5.0.2.RELEASE

compile

org.springframework

spring-beans

5.0.2.RELEASE

compile

org.springframework

spring-core

5.0.2.RELEASE

compile

org.springframework

spring-expression

5.0.2.RELEASE

compile

org.springframework

spring-instrument

5.0.2.RELEASE

compile

true

spring-web

这个jar 文件包含Web 应用开发时,用到Spring 框架时所需的核心类,包括自动载入Web ApplicationContext 特性的类、Struts 与JSF 集成类、文件上传的支持类、Filter 类和大量工具辅助类。

com.caucho

hessian

4.0.51

compile

true

com.fasterxml.jackson.core

jackson-databind

2.9.2

compile

true

com.fasterxml.jackson.dataformat

jackson-dataformat-cbor

2.9.2

compile

true

com.fasterxml.jackson.dataformat

jackson-dataformat-smile

2.9.2

compile

true

com.fasterxml.jackson.dataformat

jackson-dataformat-xml

2.9.2

compile

true

com.fasterxml.woodstox

woodstox-core

5.0.3

compile

stax-api

stax

true

com.fasterxml

aalto-xml

1.0.0

compile

true

com.google.code.gson

gson

2.8.2

compile

true

com.google.protobuf

protobuf-java-util

3.5.0

compile

true

com.googlecode.protobuf-java-format

protobuf-java-format

1.4

compile

true

com.rometools

rome

1.9.0

compile

true

com.squareup.okhttp3

okhttp

3.9.1

compile

true

commons-fileupload

commons-fileupload

1.3.3

compile

true

io.netty

netty-all

compile

true

io.projectreactor.ipc

reactor-netty

compile

true

io.reactivex.rxjava2

rxjava

2.1.6

compile

true

io.reactivex

rxjava

1.3.4

compile

true

io.reactivex

rxjava-reactive-streams

1.2.1

compile

true

io.undertow

undertow-core

1.4.21.Final

compile

true

javax.el

javax.el-api

3.0.1-b04

compile

true

javax.faces

javax.faces-api

2.2

compile

true

javax.json.bind

javax.json.bind-api

1.0

compile

true

javax.mail

javax.mail-api

1.6.0

compile

true

javax.servlet.jsp

javax.servlet.jsp-api

2.3.2-b02

compile

true

javax.servlet

javax.servlet-api

3.1.0

compile

true

javax.validation

validation-api

1.1.0.Final

compile

true

javax.xml.bind

jaxb-api

2.3.0

compile

true

javax.xml.ws

jaxws-api

2.3.0

compile

true

org.apache.httpcomponents

httpasyncclient

4.1.3

compile

commons-logging

commons-logging

true

org.apache.httpcomponents

httpclient

4.5.3

compile

commons-logging

commons-logging

true

org.apache.tomcat.embed

tomcat-embed-core

8.5.23

compile

true

org.codehaus.groovy

groovy-all

2.4.13

compile

true

org.eclipse.jetty

jetty-server

9.4.7.v20170914

compile

javax.servlet-api

javax.servlet

true

org.eclipse.jetty

jetty-servlet

9.4.7.v20170914

compile

javax.servlet-api

javax.servlet

true

org.jetbrains.kotlin

kotlin-reflect

1.1.61

compile

true

org.jetbrains.kotlin

kotlin-stdlib

1.1.61

compile

true

org.springframework

spring-aop

5.0.2.RELEASE

compile

true

org.springframework

spring-beans

5.0.2.RELEASE

compile

org.springframework

spring-context

5.0.2.RELEASE

compile

true

org.springframework

spring-core

5.0.2.RELEASE

compile

org.springframework

spring-oxm

5.0.2.RELEASE

compile

true

org.synchronoss.cloud

nio-multipart-parser

1.1.0

compile

true

spring-webmvc

这个jar 文件包含Spring MVC 框架相关的所有类。包括框架的Servlets,Web MVC框架,控制器和视图支持。当然,如果你的应用使用了独立的MVC 框架,则无需这个JAR 文件里的任何类。

com.fasterxml.jackson.core

jackson-databind

2.9.2

compile

true

com.fasterxml.jackson.dataformat

jackson-dataformat-cbor

2.9.2

compile

true

com.fasterxml.jackson.dataformat

jackson-dataformat-smile

2.9.2

compile

true

com.fasterxml.jackson.dataformat

jackson-dataformat-xml

2.9.2

compile

true

com.lowagie

itext

2.1.7

compile

true

com.rometools

rome

1.9.0

compile

true

javax.el

javax.el-api

3.0.1-b04

compile

true

javax.servlet.jsp.jstl

javax.servlet.jsp.jstl-api

1.2.1

compile

true

javax.servlet.jsp

javax.servlet.jsp-api

2.3.2-b02

compile

true

javax.xml.bind

jaxb-api

2.3.0

compile

true

org.apache.poi

poi-ooxml

3.17

compile

true

org.apache.tiles

tiles-api

3.0.8

compile

true

org.apache.tiles

tiles-core

3.0.8

compile

jcl-over-slf4j

org.slf4j

true

org.apache.tiles

tiles-el

3.0.8

compile

jcl-over-slf4j

org.slf4j

true

org.apache.tiles

tiles-extras

3.0.8

compile

spring-web

org.springframework

jcl-over-slf4j

org.slf4j

true

org.apache.tiles

tiles-jsp

3.0.8

compile

jcl-over-slf4j

org.slf4j

true

org.apache.tiles

tiles-servlet

3.0.8

compile

jcl-over-slf4j

org.slf4j

true

org.codehaus.groovy

groovy-all

2.4.13

compile

true

org.freemarker

freemarker

2.3.27-incubating

compile

true

org.jetbrains.kotlin

kotlin-reflect

1.1.61

compile

true

org.jetbrains.kotlin

kotlin-stdlib

1.1.61

compile

true

org.reactivestreams

reactive-streams

compile

true

org.springframework

spring-aop

5.0.2.RELEASE

compile

org.springframework

spring-beans

5.0.2.RELEASE

compile

org.springframework

spring-context

5.0.2.RELEASE

compile

org.springframework

spring-context-support

5.0.2.RELEASE

compile

true

org.springframework

spring-core

5.0.2.RELEASE

compile

org.springframework

spring-expression

5.0.2.RELEASE

compile

org.springframework

spring-oxm

5.0.2.RELEASE

compile

true

org.springframework

spring-web

5.0.2.RELEASE

compile

org.webjars

webjars-locator

0.32-1

compile

true

javax.servlet

javax.servlet-api

4.0.0

provided