springboot-thymeleaf

27-springboot-thymeleaf内置对象

1、内置web对象 thymaleaf内置的web对象,可以直接在模板中使用,这些对象由#号开头: #request: 相当于HttpServletRequest 对象,这是Thymeleaf 3.x版本,若是Thymeleaf 2.x版本使用 #httpServletRequest; ${#req ......

26-springboot-thymeleaf字符串拼接-常量-符号

Thymeleaf 字符串拼接 一种是字符串拼接: <span th:text="'当前是第'+${sex}+'页 ,共'+${sex}+'页'"></span> 另一种更简洁的方式,使用“|”减少了字符串的拼接: <span th:text="|当前是第${sex}页,共${sex}页|"></s ......

25-springboot-thymeleaf的常见属性

th:action <form id="login" th:action="@{/login}">......</form> th:method <form id="login" th:action="@{/login}" th:method="post">......</form> th:href ......

24-springboot-thymeleaf的表达式

1.添加热部署,为了测试不用频繁重启 <!--热部署插件--><dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional>true</ ......
共4篇  :1/1页 首页上一页1下一页尾页