https://spring.io/tools3/sts/legacy
複製代碼
sts-bundle\sts-3.9.7.RELEASE\STS.exe
複製代碼
打開 Dashboard,點擊 CREATE SPRING STARTER PROJECThtml
進入 New Spring Starter Project,設置項目名稱(Name)、項目 maven 座標(Group、Artifact),點擊 Nextjava
進入 New Spring Starter Project Dependencies,選擇項目依賴 jar 包web
點擊 Finish,進入項目spring
新建 HelloWorld.java,輸入以下代碼:shell
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!";
}
}
複製代碼
選中 DemoApplication.java,右鍵 Run As -> Spring Boot App瀏覽器
瀏覽器輸入:http://localhost:8080/app
完maven
PS:本機 java JDK8ui