当前位置:
硬件测评 > 还有人不知道SpringBoot的四个核心组件吗?
还有人不知道SpringBoot的四个核心组件吗?
前言
首先让我透露一下这四个主要组件是:启动器、自动配置、CLI 和执行器。下面我们就详细介绍一下它们的一些用途。
一、弹簧启动启动器
1.1 启动器应用示例
<依赖>
<groupId>org.springframework.bootgroupId >
<artifactId> spring -boot-starter-thymeleafartifactId>
依赖>
<依赖>
groupId>org.Mybatis .spring.bootgroupId>
<artifactId>mybat is-sp 环启动启动器artifactId>
<版本>1.3.2版本>
依赖>
您将始终在我们的Spring Boot项目的POM文件中看到这两个依赖项:spring-boot-starter-xxx
和 xxx -spring-boot-starter
。
这就是启动器,Spring Boot 的四大组件之一。
a、spring-boot-starter-thymeleaf