https://blog.csdn.net/xiangluer/article/details/83147571[试了一下,虽然不知道是为什么但是解决了]
在application.yml下添加如下代码
spring:
thymeleaf:
cache: false
servlet:
content-type: text/html
mode: LEGACYHTML5
在pom.xml文件中添加依赖和路径
<dependency>
<groupId>net.sourceforge.nekohtml</groupId>
<artifactId>nekohtml</artifactId>
<version>1.9.22</version>
</dependency>
<build>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
</build>
做完以上的工作,我的问题已经解决了…
作者也写的特别详细,链接附在了最上边