Spring boot 使用spring引导保护web应用程序-导致异常

Spring boot 使用spring引导保护web应用程序-导致异常,spring-boot,Spring Boot,我正在尝试阅读一些spring boot教程。 我在eclipse中导入了这个: 2016-03-26 15:15:03.598 ERROR 4464 --- [nio-8080-exec-1] org.thymeleaf.TemplateEngine : [THYMELEAF][http-nio-8080-exec-1] Exception processing template "home": Error resolving template "home", temp

我正在尝试阅读一些spring boot教程。 我在eclipse中导入了这个:

2016-03-26 15:15:03.598 ERROR 4464 --- [nio-8080-exec-1] org.thymeleaf.TemplateEngine             : [THYMELEAF][http-nio-8080-exec-1] Exception processing template "home": Error resolving template "home", template might not exist or might not be accessible by any of the configured Template Resolvers
2016-03-26 15:15:03.629 ERROR 4464 --- [nio-8080-exec-1] 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 "home", template might not exist or might not be accessible by any of the configured Template Resolvers] with root cause

org.thymeleaf.exceptions.TemplateInputException: Error resolving template "home", template might not exist or might not be accessible by any of the configured Template Resolvers
    at org.thymeleaf.TemplateRepository.getTemplate(TemplateRepository.java:246) ~[thymeleaf-2.1.4.RELEASE.jar:2.1.4.RELEASE]
    at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1104) ~[thymeleaf-2.1.4.RELEASE.jar:2.1.4.RELEASE]
在“创建一个不安全的web应用程序”步骤中,我在eclipse中启动了它。它启动正常,然后在浏览器中打开,出现以下错误:

Whitelabel Error Page

This application has no explicit mapping for /error, so you are seeing this as a fallback.

Sat Mar 26 15:15:03 GMT 2016
There was an unexpected error (type=Internal Server Error, status=500).
Error resolving template "home", template might not exist or might not be accessible by any of the configured Template Resolvers
我可以在eclipse的控制台中看到以下错误:

2016-03-26 15:15:03.598 ERROR 4464 --- [nio-8080-exec-1] org.thymeleaf.TemplateEngine             : [THYMELEAF][http-nio-8080-exec-1] Exception processing template "home": Error resolving template "home", template might not exist or might not be accessible by any of the configured Template Resolvers
2016-03-26 15:15:03.629 ERROR 4464 --- [nio-8080-exec-1] 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 "home", template might not exist or might not be accessible by any of the configured Template Resolvers] with root cause

org.thymeleaf.exceptions.TemplateInputException: Error resolving template "home", template might not exist or might not be accessible by any of the configured Template Resolvers
    at org.thymeleaf.TemplateRepository.getTemplate(TemplateRepository.java:246) ~[thymeleaf-2.1.4.RELEASE.jar:2.1.4.RELEASE]
    at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1104) ~[thymeleaf-2.1.4.RELEASE.jar:2.1.4.RELEASE]
堆栈跟踪较长,如果需要,我可以提供它

除此之外,我没有从初始状态更改教程的源代码(在示例中位于初始目录中)


有什么想法吗?

错误解析模板
home
表示视图解析程序找不到任何与此路径匹配的模板

Spring Boot Starter Thymeleaf将配置一个默认视图解析器,该解析器将在以下位置找到html文件:
src/main/resources/templates/
。确保在该位置找到
home.html
。如果是,请检查在您发送给我们之前是否没有发生异常

问候,, 丹尼尔