springboot搭建的2种方式

一、搭建springboot项目有两种方式
1、继承springboot项目
<parent>
   <groupId>org.springframework.boot</groupId>
   <artifactId>spring-boot-starter-parent</artifactId>
   <version>2.0.4.RELEASE</version>
</parent>

2、实际中有时候不想以springboot作为父类,可以换另外一种方式添加springboot依赖

<!--添加版本依赖管理-->
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-dependencies</artifactId>
                <version>2.0.4.RELEASE</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

 

posted @ 2018-10-26 16:15  一步一个脚印,坚持  阅读(610)  评论(0编辑  收藏  举报