今天在写Spring-boot项目时遇到了一个问题,由于鄙人是刚学习spring-boot。在进行与thymeleaf的链接时抛出了上面的异常。用了好长时间才发现了问题。
在application.properties目录中添加
#thymeleaf spring.thymeleaf.mode=HTML spring.thymeleaf.suffix=.html spring.thymeleaf.prefix=classpath:/templates/
原来设置路径的时候还要对thymeleaf进行前缀和后缀的配置,记录一下,望对诸君有帮助!