org.thymeleaf.exceptions.TemplateInputException: Error resolving template 解决

首先展示一下这个Error 描述, 大致意思是没有找到我所配置的template的位置,然而我找了N遍

ERROR 20044 --- [nio-8080-exec-7] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.thymeleaf.exceptions.TemplateInputException: Error resolving template "demo", template might not exist or might not be accessible by any of the configured Template Resolvers] with root cause

后面重现创建一个工程项目对比发现,thtmeleaf的配置中有一个坑,这里记录下

spring:
 thymeleaf: prefix: /templates/
    suffix: .html

然而出现了


Fail

注释后


succeed

来一张图片压压惊


好了,祝各位晚安

你可能感兴趣的:(org.thymeleaf.exceptions.TemplateInputException: Error resolving template 解决)