diff --git a/thymeleaf/src/main/java/com/example/thymeleaf/basic/BasicController.java b/thymeleaf/src/main/java/com/example/thymeleaf/basic/BasicController.java index c913c0f0..e968fa43 100644 --- a/thymeleaf/src/main/java/com/example/thymeleaf/basic/BasicController.java +++ b/thymeleaf/src/main/java/com/example/thymeleaf/basic/BasicController.java @@ -78,6 +78,13 @@ public class BasicController { return "basic/literal"; } + @GetMapping("/operation") + public String operation(Model model) { + model.addAttribute("nullData", null); + model.addAttribute("data", "Spring!"); + return "basic/operation"; + } + @Component("helloBean") static class HelloBean { public String hello(String data) { diff --git a/thymeleaf/src/main/resources/templates/basic/operation.html b/thymeleaf/src/main/resources/templates/basic/operation.html new file mode 100644 index 00000000..27d46c64 --- /dev/null +++ b/thymeleaf/src/main/resources/templates/basic/operation.html @@ -0,0 +1,45 @@ + + + + + Title + + + + + \ No newline at end of file