构建Springboot项目的3种方式

1、本身建立:

  1.建立maven项目spring

  2.pom.xml添加以下内容:springboot

<!--1.指定依赖都由springboot管理-->
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.5.2.RELEASE</version>
    </parent>
    <!-- 。。。 -->
    
<dependencies>
    <!--2.添加须要用到的依赖-->
    <dependency>
       <groupId>org.springframework.boot</groupId>
       <artifactId>spring-boot-starter</artifactId>
    </dependency>
</dependencies>

  3.建立springboot项目启动类:app

@SpringBootApplication public class MyApplication { public static void main(String[] args) { SpringApplication app = new SpringApplication(MyApplication.class); app.run(args); } }

2、Web下载基础项目包

  1.进入spring官网下载springboot项目包:http://https://start.spring.io/maven

  2.选择须要的配置后下载:spring-boot

 

   3.下载后解压,在编译器里导入maven项目便可工具

3、sts工具建立:(spring tool suit)

  1.下载并安装spring tool suit :https://spring.io/tools3/sts/all  (sts是一个定制版的Eclipse,专为Spring开发定制的,方便建立调试运行维护Spring应用。ui

  2.选择配置并建立项目:spa

相关文章
相关标签/搜索