thymeleaf 模板使用 之 解决因HTML标签未闭合引起的错误
2024-09-02 10:39:47
一、修改thymeleaf属性配置
spring.thymeleaf.prefix=classpath:/templates/
spring.thymeleaf.suffix=.html
spring.thymeleaf.mode=LEGACYHTML5
spring.thymeleaf.encoding=UTF-
spring.thymeleaf.content-type=text/html
spring.thymeleaf.cache=false
二、添加依赖(LEGACYHTML5需要搭配一个额外的库NekoHTML才可用)
<dependency>
<groupId>net.sourceforge.nekohtml</groupId>
<artifactId>nekohtml</artifactId>
<version>1.9.</version>
</dependency>
最新文章
- SQL Server CONVERT() 截取日期
- 【转】封装Lua for C#
- java读取word内容
- 通过反射执行get、set方法
- Spring aop 实现异常拦截
- 有关C++ std::string 类的类型转换 其他语言永远无法理解的伤
- ‘char *&#39; differs in levels of indirection from &#39;int&#39;
- codefroce D. Powerful array[初识块状数组]
- 纯Python综合图像处理小工具(1)分通道直方图
- TableView的性能优化
- tomcat在centos下的操作
- cocos2d中个类之间的关系
- JQuery官方学习资料(译):JQuery对象
- Kotlin 或将取代 Java&mdash;&mdash;《Java 编程思想》作者 Bruce Eckel [转]
- TP中的图片水印
- Cisco Common Service Platform Collector - Hardcoded Credentials(CVE-2019-1723)
- angular7一周学习
- 圆桌的项目Alpha冲刺(团队)
- day 57 data 插件 表的增删改查
- 学习5_STM32--外设通信方式