三郎Java框架学习:SpringBoot的起步依赖及其作用

SpringBoot的起步依赖及其作用

SpringBoot要求,项目要继承SpringBoot的起步依赖spring-boot-starter-parent

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.0.1.RELEASE</version>
</parent>

SpringBoot要集成SpringMVC进行Controller的开发,所以项目要导入web的启动依赖

<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
</dependencies>

作用
封装打包依赖坐标提供默认功能便于快速开发配置
本质上是一个Maven项目对象模型(Project Object Model,POM),
定义了对其他库的传递依赖,这些东西加在一起即支持某项功能。
简单的说,起步依赖就是将具备某种功能的坐标打包到一起,并提供一些默认的功能

猜你喜欢

转载自blog.csdn.net/m0_51684972/article/details/115057242