Thymeleaf引擎基本配置
视图:prefix:前缀 classpath:/templates/ suffix:后缀 .html
@{} <--!表示链接 比如:th:href="@{}",th:src="@{}"-->
${} <--!表示获取的变量 比如:<span th:text="${msg}"></span>-->
<!--依赖-->
<!--thymeleaf-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
xmlns:th="http://www.thymeleaf.org" <!--配置后可以出提示-->
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
</body>
</html>
去除缓存配置
spring:
thymeleaf:
cache: false
如果配置了后还是没有效果的话可以试一下下面的方法
这样子基本上就可以成功去除缓存了!!!