从创建一个新的Spring Boot项目到输出”Hello World”为止

研发环境

Mac操作系统
Spring工具套件IDE
Java 1.8.0_60

操作步骤

スクリーンショット 2015-10-19 21.28.00.png
スクリーンショット 2015-10-19 21.29.41.png
スクリーンショット 2015-10-19 21.30.39.png

请参考以下网址:http://qiita.com/don_hanabi/items/fe5223c64ecc44a0d944

package com.example;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class HelloController {
    @RequestMapping("/")![Invalid file type: ]()

    public String index() {
        return "Hollow World!";
    }
}

选择要启动的项目,然后选择Run As>Spring Boot应用程序。

スクリーンショット 2015-10-19 21.43.10.png
スクリーンショット 2015-10-19 21.44.23.png

请在浏览器中确认以下状态
http://localhost:8080/

スクリーンショット 2015-10-19 21.44.50.png
bannerAds