添加了 thymeleaf 的依賴仍然報錯
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
錯誤信息:
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Sun Apr 26 22:45:57 CST 2020
There was an unexpected error (type=Not Found, status=404).
No message available
可能是版本的問題,加上版本號,可以了。
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
<version>2.0.0.RELEASE</version>
</dependency>