首页 > 其他分享 >thymeleaf

thymeleaf

时间:2022-12-13 13:57:26浏览次数:32  
标签:thymeleaf 性别

<!DOCTYPE html> <html lang="en" xmlns:th="http://www.thymeleaf.org"> <head>     <meta charset="UTF-8">     <title>thymeleaf</title> </head> <body> <!--    获取变量-->     <h1 th:text="${msg}"></h1> <!--    可以解析标签:utext-->     <h1 th:utext="${msg2}"></h1>
<!--    判断-->     <div>         性别:         <span th:if="${sex == 0}">             男         </span>         <span th:unless="${sex == 0}">             女         </span>     </div>
<!--    循环-->     <div>         <ul>             <li th:each="name: ${names}" th:text="${name}">
            </li>         </ul>     </div>
</body> </html>

标签:thymeleaf,性别
From: https://www.cnblogs.com/cnetsa/p/16978552.html

相关文章

  • 【JAVA】基于thymeleaf+bootstrap的页面嵌套
    网站中对于公共元素(如导航栏等)的使用,可以在页面使用th:insert标签嵌入对应的div等元素,以下展示一个简单的嵌套demo。即将导航栏、登入登出模态对话框作为公共元素引入,代码如......
  • SpringBoot+Bootstrap+Thymeleaf+Restful 实现图书商城管理
    课程名称:企业项目实训II设计题目:大学当图书商城已知技术参数和设计要求:1.问题描述(功能要求):1.1顾客端1)注册登录:游客可浏览所有图书,只有注册用户才能添加购物车、下订单......
  • Spring Boot中添加Thymeleaf模板
    SpringBoot中添加Thymeleaf模板前面我们讲解了SpringBoot项目的创建、SpringBoot结构信息,自动配置功能等,那么Springboot创建出来,我们最终是要做web开发的,所以我们这章讲......
  • Spring Boot中添加Thymeleaf模板
    SpringBoot中添加Thymeleaf模板前面我们讲解了SpringBoot项目的创建、SpringBoot结构信息,自动配置功能等,那么Springboot创建出来,我们最终是要做web开发的,所以我们这......
  • day42 6-5 springMVC调度器、ModelAndView、配置thymeleaf模板引擎 & 6-6 thymeleaf语
    springMVC调度器-DispatcherServlet-SpringMVC框架的入口定义DispatcherServlet成为调度器,配置在web.xml文件中,用于拦截匹配的请求。并解析请求url,将请求分发给对应......
  • 解决spring5与thymeleaf版本冲突的问题
    我的springboot版本是2.2.6.RELEASE但是我的thymeleaf是这样配置的<thymeleaf.version>3.0.9.RELEASE</thymeleaf.version><!--布局功能的支持程序thymeleaf3主程......
  • Thymeleaf学习
    Thymeleaf学习三大模板jsphtmlthymeleaftldfreemarker面试题:什么是模板,为什么使用thymeleaf模板?第一,Thymeleaf在有网络和无网络的环境下皆可运行,......
  • 学习springboot2的第7天(2021-12-06)43-视图解析-Thymeleaf初体验
    学习springboot2的第7天(2021-12-06)43-视图解析-Thymeleaf初体验视图解析:指的就是springboot在处理完请求之后想要跳转到某个页面的过程。springboot默认不支持JSP,需要引入第......
  • SpringBoot 10: SpringBoot使用Thymeleaf模板引擎替代jsp
    Thymeleaf模板引擎简介Thymeleaf:是使用java开发的模板技术,在服务器端运行,把处理后的数据发送给浏览器模板是作视图层工作的,用来显示数据的Thymeleaf是基于Html语言的......
  • SpringBoot整合Thymeleaf(十三)
    二八佳人体似酥,腰间仗剑斩愚夫。虽然不见人头落,暗里教君骨髓枯。上一章简单介绍了SpringBoot整合Velocity(十二)如果没有看过,​​请观看上一章​​一.Thymeleaf的介绍Thym......