当页面和程序明确无误后,还是展示出以下错误:
1.[浏览器提示]
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Fri Oct 20 14:11:55 CST 2017
There was an unexpected error (type=Not Found, status=404).
No message available
2.程序console中并没有任何的异常提示。
解决方案:
pom.xml中加入
<properties>
<!--
springboot 默认使用thymeleaf的2.0,即:spring-boot-starter-thymeleaf中包含的是thymeleaf2.X
springboot1.5.2+需要使用thymeleaf3.X。手动去配置
-->
<thymeleaf.version>3.0.2.RELEASE</thymeleaf.version>
<thymeleaf-layout-dialect.version>2.0.4</thymeleaf-layout-dialect.version>
</properties>