当遇到这个错误:网页访问不了
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Tue Jan 11 22:06:27 CST 2022
There was an unexpected error (type=Not Found, status=404).
No message available
此应用程序没有/error的显式映射,因此您将其视为回退。
解决办法:
方法一:类使用@RestController注解