注:SpringBoot的版本是1.4.8。
图1 SpringBoot的模块继承图
图1的原图在Github上。
图2 SpringBoot-1.4.8源码目录结构
- spring-boot-dependencies中无Java代码,它的dependencyManagement中定义了很多依赖,并指定了版本。
- spring-boot-starter-parent中无Java代码,它的dependencyManagement中,spring-core依赖排除commons-logging依赖,如下所示:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</dependencyManagement>
- spring-boot-parent中无Java代码,它的dependencyManagement中新增了一些依赖。
- spring-boot中,是启动应用的源码。
- spring-boot-starters是个pom,包含了很多子module。
- spring-boot-starter中无Java代码,但它的dependencies添加了一些依赖,代码如下:
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<scope>runtime</scope>
</dependency>
</dependencies>
Reference:
1. SpringBoot-1.4.8的Github: https://github.com/spring-projects/spring-boot/tree/1.4.x