spring.thymeleaf.content-type=text/html spring.thymeleaf.cache=false spring.thymeleaf.mode =LEGACYHTML5
LEGACYHTML5需要搭配一个额外的库NekoHTML才可用
项目中使用的构建工具是Maven添加如下的依赖即可完成:
pom.xml 中引入
<dependency> <groupId>net.sourceforge.nekohtml</groupId> <artifactId>nekohtml</artifactId> <version>1.9.22</version> </dependency>