springboot整合thymeleaf跳转html页面时出现下面错误
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Thu May 28 22:35:20 CST 2020
There was an unexpected error (type=Not Found, status=404).
No message available
这个错误的出现一般是SpringBoot的启动类类名上面有@SpringBootApplication注解 与controller包不在同一个目录下,解决方案就是把启动类和controller包放在同目录下,或者访问到controller包。
运行错误的时候启动类如下:
修改如下:
运行成功