Spring Boot | 使用Spring Initializr快速创建

简单快速搭建启动Spring Boot项目

教程源码Github地址
教程源码Gitee地址

  • Create New Prject | 创建新项目
    Spring Boot | 使用Spring Initializr快速创建

  • 选择 Spring Initializr
    Spring Boot | 使用Spring Initializr快速创建

  • 填好信息选择下一步
    Spring Boot | 使用Spring Initializr快速创建

  • 可以选择一些工具
    Spring Boot | 使用Spring Initializr快速创建

  • 创建好后项目会开始初始化,等待一下
    Spring Boot | 使用Spring Initializr快速创建

  • 修改启动类 SpringBootSiApplication

package com.cyinfotech.springbootsi;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@SpringBootApplication
@RestController
public class SpringBootSiApplication {

    public static void main(String[] args) {
        SpringApplication.run(SpringBootSiApplication.class, args);
    }

    @RequestMapping("/")
    public String getIndex () {

        return "Hello Spring Boot";
    }
}

Spring Boot | 使用Spring Initializr快速创建