IntelliJのインストール
Intellijには無料版と有料版がありますが、今回は無料版IntelliJ IDEA Community Editionを使用します。
https://www.jetbrains.com/idea/download/?section=windows#section=windows
SpringBootプロジェクトの作成
IntelliJでプロジェクトを開く
HelloWorldのサンプル作成
package com.example.demo.controller;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.GetMapping;
@RestController
public class HelloController {
// 「/hello」へアクセスがあった場合
@GetMapping("/hello")
public String helloWorld() {
// 文字列を返す
return "Hello Spring-Boot World!!";
}
}