当前位置:网站首页>th:include的使用
th:include的使用
2022-07-08 00:53:00 【海涛高软】
<head th:include="相对于templates的地址/include :: header"></head> <div th:include="album/include :: footer"></div>
th:include 和 th:replace 都可以引入模块,两者的区别在于:
th:include:引入子模块的 children,依然保留父模块的 tag
th:replace:引入子模块的所有,不保留父模块的 tag
举个例子
<footer th:fragment="copy">
© 2018 Copyright by holyong.
</footer>
引入界面
<body>
...
<div th:include="footer :: copy"></div>
<div th:replace="footer :: copy"></div>
</body>
显示结果
<body>
...
<div>
© 2018 Copyright by holyong.
</div>
<footer>
© 2018 Copyright by holyong.
</footer>
</body>
边栏推荐
- 《通信软件开发与应用》课程结业报告
- CV2 read video - and save image or video
- Nmap tool introduction and common commands
- The generosity of a pot fish
- [knowledge map paper] Devine: a generative anti imitation learning framework for knowledge map reasoning
- XMeter Newsletter 2022-06|企业版 v3.2.3 发布,错误日志与测试报告图表优化
- 力扣4_412. Fizz Buzz
- 软件测试笔试题你会吗?
- Why did MySQL query not go to the index? This article will give you a comprehensive analysis
- Monthly observation of internet medical field in May 2022
猜你喜欢
[knowledge atlas paper] minerva: use reinforcement learning to infer paths in the knowledge base
Mqtt x newsletter 2022-06 | v1.8.0 release, new mqtt CLI and mqtt websocket tools
adb工具介绍
Xmeter newsletter 2022-06 enterprise v3.2.3 release, error log and test report chart optimization
See how names are added to namespace STD from cmath file
JVM memory and garbage collection-3-runtime data area / method area
Nacos microservice gateway component +swagger2 interface generation
Give some suggestions to friends who are just getting started or preparing to change careers as network engineers
leetcode 865. Smallest Subtree with all the Deepest Nodes | 865.具有所有最深节点的最小子树(树的BFS,parent反向索引map)
数据链路层及网络层协议要点
随机推荐
The bank needs to build the middle office capability of the intelligent customer service module to drive the upgrade of the whole scene intelligent customer service
Many friends don't know the underlying principle of ORM framework very well. No, glacier will take you 10 minutes to hand roll a minimalist ORM framework (collect it quickly)
Semantic segmentation | learning record (3) FCN
EMQX 5.0 发布:单集群支持 1 亿 MQTT 连接的开源物联网消息服务器
Introduction à l'outil nmap et aux commandes communes
[knowledge atlas paper] minerva: use reinforcement learning to infer paths in the knowledge base
Leetcode question brushing record | 27_ Removing Elements
In the digital transformation of the financial industry, the integration of business and technology needs to go through three stages
线程死锁——死锁产生的条件
Flutter 3.0框架下的小程序运行
VIM string substitution
《通信软件开发与应用》课程结业报告
Ml self realization / linear regression / multivariable
Vim 字符串替换
Give some suggestions to friends who are just getting started or preparing to change careers as network engineers
[recommendation system paper reading] recommendation simulation user feedback based on Reinforcement Learning
OpenGL/WebGL着色器开发入门指南
Semantic segmentation | learning record (4) expansion convolution (void convolution)
XXL job of distributed timed tasks
Direct addition is more appropriate