这里其实是说, 你想要开发那些功能, 需要引用那些jar 文件, 也是 Spring Boot 中的依赖.
起步依赖本质上是一个 Maven 项目对象模型(Project Object Model, POM), 定义了对其他库的传递依赖, 这些东西加在一起, 可以支持某些功能. 什么起步依赖的命名都暗示了他们提供的某种或某类功能.
Maven 的 pom.xml 中, 依赖如下:
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
大部分情况下,你都无需关心每个Spring Boot起步依赖分别声明了些什么东西。 Web起步依赖能让你构建Web应用程序, Thymeleaf起步依赖能让你用Thymeleaf模板, Spring Data JPA起步依赖能让你用Spring Data JPA将数据持久化到数据库里,通常只要知道这些就足够了。但是,即使经过了Spring Boot团队的测试,起步依赖里所选的库仍有问题该怎么办?如何覆盖起步依赖呢? 下一个继续.
虽然记录读书笔记, 将会降低读书的速度, 但是却记住更多的东西, 因为要来回的看书, 该怎么写笔记. 应该写什么, 不应该写什么.