首页 > 编程语言 > 详细

springBoot之 spring-boot-starter-parent 引入详解

时间:2020-11-08 22:30:07      阅读:53      评论:0      收藏:0      [点我收藏+]

springBoot中引入

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

相当于引入一个父类版本的jar库,在以后的

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

中可不写version版本,因为有父类会自动匹配。

注意:父类没有的jar版本,还是要

<dependency>
    <groupId>mysql</groupId>
    <artifactId>mysql-connector-java</artifactId>
    <version>${mysql.version}</version>
</dependency>

样式引入

springBoot之 spring-boot-starter-parent 引入详解

原文:https://www.cnblogs.com/qfdy123/p/13945374.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!