1、下載 spring-tool-suite
https://spring.io/tools3/sts/legacy
複製程式碼

2、解壓執行
sts-bundle\sts-3.9.7.RELEASE\STS.exe
複製程式碼

3、新建工程
開啟 Dashboard,點選 CREATE SPRING STARTER PROJECT

進入 New Spring Starter Project,設定專案名稱(Name)、專案 maven 座標(Group、Artifact),點選 Next

進入 New Spring Starter Project Dependencies,選擇專案依賴 jar 包

點選 Finish,進入專案

4、Hello World
新建 HelloWorld.java,輸入如下程式碼:
package com.example.demo;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class HelloWorld {
@RequestMapping("/")
public String Hello() {
return "Hello World!";
}
}
複製程式碼

5、執行
選中 DemoApplication.java,右鍵 Run As -> Spring Boot App

瀏覽器輸入:http://localhost:8080/

完
PS:本機 java JDK8