Spring-boot(一)通过向导快速创建Spring-boot项目

2023-05-01,,

通过向导快速创建Spring-boot项目
创建步骤:

    选择Spring Initializr

    填写组织和模块名

    选择对应的模块

    注:这里左侧的模块比较多,玩家可以根据自己的实际需要自由选择,此处暂时选择web

    完成

    等待项目自动下载相关依赖完成项目创建

    注:项目类型为maven的话,需要配置阿里云仓库才不会特别慢

    setting.xml

alimaven
aliyun maven
http://maven.aliyun.com/nexus/content/groups/public/
central

```

    编写测试类

    package com.wujianqinjian.Controller;
    import org.springframework.web.bind.annotation.Mapping;
    import org.springframework.web.bind.annotation.RequestMapping;
    import org.springframework.web.bind.annotation.RestController; /**
    * Created by JianH on 2019/11/15.
    */
    @RestController
    public class HelloController
    {
    @RequestMapping("/hello")
    public String hellofanrui(){
    return "你好,樊瑞";
    }
    }

    启动项目,浏览器访问127.0.0.1:8080

Spring-boot(一)通过向导快速创建Spring-boot项目的相关教程结束。

《Spring-boot(一)通过向导快速创建Spring-boot项目.doc》

下载本文的Word格式文档,以方便收藏与打印。