zoukankan      html  css  js  c++  java
  • Spring Boot 快速搭建的三种方式

    方式一:http://start.spring.io/

    1. 打开浏览器,在地址栏中输入http://start.spring.io/ 如下图: 
      这里写图片描述

      点击generate project 然后就会有一个zip包下载到本地,解压,导入自己的ide即可开发。

    方式二:利用InteIIiJ IDEA 创建

        InteIIiJ IDEA是我自己最喜欢的开发工具,因为它对新技术有第一时间的支持,使用InteIIiJ IDEA14.1以上的版本可以直接新建spring Boot项目。创建方式如下:   

    打开idea
    这里写图片描述
    这里写图片描述
    这里写图片描述

    方式三:Maven手工构建

    1. 创建一个普通maven项目
    2. 添加spirng Boot的父级依赖 
      添加完这个包当前的项目就是spring Boot项目了,spring-boot-starter-parent 是一个特殊的starter,他用来提供相关的Maven默认依赖,使用它之后,常用的包依赖可以省去version标签,关于Spring Boot 提供了哪些jar包依赖,可查看.m2文件中的声明。
        <parent>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-parent</artifactId>
            <version>1.3.5.RELEASE</version>
            <relativePath/>
        </parent>

    3.添加web支持的starter pom ,这样就添加了web依赖。

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

    4.添加spring Boot的编译插件

         <build>
            <plugins>
                <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                </plugin>
            </plugins>
        </build>

    5.等maven依赖加载完毕之后,就可以创建springBoot的相关文件了。

  • 相关阅读:
    JDBC的异常
    JDBC的事务
    JDBC的数据类型
    JDBC的结果集
    JDBC操作MySQL出现:This result set must come from a statement that was created with a result set type of ResultSet.CONCUR_UPDATABLE, ...的问题解决
    JDBC的Statement对象
    JDBC连接数据库
    JDBC驱动类型
    JDBC实例代码
    java与javax的区别分析(转)
  • 原文地址:https://www.cnblogs.com/louby/p/8241181.html
Copyright © 2011-2022 走看看