Spring(基礎)-21.12.08
1. Welcome Page
2.胸腺テンプレートエンジン @Controller
public class HelloController {
@GetMapping("hello")
public String hello(Model model) {
model.addAttribute("data", "hello!!"); // thymeleaf 에 data 변수명으로 값 전달
return "hello"; // templates/hello.html
}
}
@Controller
public class HelloController {
@GetMapping("hello")
public String hello(Model model) {
model.addAttribute("data", "hello!!"); // thymeleaf 에 data 변수명으로 값 전달
return "hello"; // templates/hello.html
}
}
( templates/hello.html )
3.構築および実行
Reference
この問題について(Spring(基礎)-21.12.08), 我々は、より多くの情報をここで見つけました https://velog.io/@bellpro/Spring-2021.12.08テキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol