自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(8)
  • 收藏
  • 关注

原创 springboot-thymeleaf - 内嵌变量和布局

……上一章 thymeleaf - 下拉单选多选下一章 thymeleaf - 布局th:include/th:replace

2020-03-26 20:55:31 495

原创 springboot - thymeleaf - 选中框默认选中

……

2020-03-25 18:45:26 3968 1

原创 springboot - thymeleaf - 三元(三目)运算

语法是:"条件表达式 ? 表达式1 : 表达式2"条件表达式true执行表达式1、反之执行 表达式2后台:controller 使用Model传递属性值model.addAttribute("sex", "女");html:th:text<div th:text="${sex} == '男' ? '男士':'非男士' "></div><div t...

2020-03-25 18:39:23 3632

原创 springboot-thymeleaf的使用 - 循环

th:each……上一章 thymeleaf - 判断下一章 thymeleaf - 三元(三目)运算

2020-03-24 21:21:16 2450

原创 springboot-thymeleaf的使用 - 判断

if、unless、switchth:ifth:unlessth:switch 和 th:caseth:if返回值决定标签的显示与否,语法 th:if="${boolean表达式}"若boolean表达式不成立、无效。则会显示标签controller: hello方法@RequestMapping("/hello") public String hello(Model model){...

2020-03-24 21:13:56 420

原创 springboot-thymeleaf的使用 - url

thymeleaf路径格式 @{/url}th:href="@{/}" 项目根路径,相当于jsp中 href="${pageContext.request.contextPath}" <a th:href="@{/user/list}">查询用户列表</a>访问路径带参数(常量和变量),多个参数使用,号隔开<a th:href="@{/user/byNam...

2020-03-24 14:57:52 385

原创 springboot-thymeleaf的使用(1)

html页面接受内容th:text 文本th:text和th:utext的区别th:value 值th:text 文本th:text 替换标签里的内容:controller中跳转带参数name值 html页面使用${属性名}获取变替换span标签中的内容访问 http://localhost:8080/hellotext内容拼接使用单引号’ '和+拼接<span th...

2020-03-24 14:14:37 141

原创 springboot整合thymeleaf

springboot整合thymeleaf一、idea建个springboot项目二、pom.xml添加thymeleaf依赖三、application.properties文件中配置访问路径四、建html页面thymeleaf:一个跟 Velocity、FreeMarker 类似的模板引擎,最大的特点是能够直接在浏览器中打开并正确显示模板页面,而不需要启动整个Web应用。可以完全代替JSP(使...

2020-03-23 22:10:19 130

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除