今天运行第一个SpringBoot程序时,就遇到第一个问题了
问题:Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Fri Apr 02 19:42:53 CST 2021
There was an unexpected error (type=Not Found, status=404)
解释:.这个应用程序没有显式的/error 映射,因此您将其视为一个后备方案。
简单来说找不到@RequestMapping(“/”),就是主程序类和controller类不在同一个包内。