- Eclipse - File - New - Other
- Spring Boot - Spring Starter Project - Next

New Spring Starter Project 1.png
- Next

New Spring Starter Project 2.png
- Next

New Spring Starter Project 3.png
- Finish
實(shí)現(xiàn)REST請(qǐng)求
- 創(chuàng)建 controller 文件夾,并實(shí)現(xiàn) TestController
package com.spring.boot.test.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class TestController {
@RequestMapping("hello")
public String hello(String name) {
return "Spring Boot Test Hello Name " + name;
}
}
- 項(xiàng)目右鍵 - Run As - Spring Boot App
- 瀏覽器訪問(wèn):localhost:8080/hello?name=test