menu
書いてる野郎
orebike@gmail.com
Controller アノテーションをつけたクラスから String をリターンすることにして、
そのパス指定が src/main/resources/templates
以下に合致するもの .html
のファイルが呼び出される。
@Controller @RequestMapping("/sample01") public class Sample01Controller { @RequestMapping("/") public String index() { return "sample01/index"; } }
この場合なら src/main/resources/templates/sample01/index.html
が呼び出される。