SpringBoot的pom文件

2019-08-17  本文已影响0人  拉提娜的爸爸

1、父项目

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.1.6.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>

2、starter启动器

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

spring-boot-starter:SpringBoot场景启动器,帮我们导入了web项目正常运行所依赖的组件
springboot讲所有的功能场景都抽取出来,做成一个个starter启动器,只需在项目里引入这些starter,相关场景的所有依赖都会导入进来,用什么功能,就导入什么场景的启动器依赖。
例如:

image.png
上一篇 下一篇

猜你喜欢

热点阅读