Spring Boot Thymeleaf 默认的加载路径

Spring Boot Thymeleaf 默认的加载路径

默认路径的源码:

使用Eclipse 按快捷键 ctrl +shift +t 可以查类: 查找 ThymeleafAutoConfiguration 这个类

在这里插入图片描述

点击进去 :

可以看到默认加载类:在这里插入图片描述
点击 ThymeleafPropecties :

在这里插入图片描述

可以知道默认加 的是 classpath:/templates/ xxxx.html 文件

猜你喜欢

转载自blog.csdn.net/weng74/article/details/102538332