spring boot成功启动后访问报错404的问题

Whitelabel Error Page

This application has no explicit mapping for /error, so you are seeing this as a fallback.

Wed Dec 14 16:35:25 CST 2016
There was an unexpected error (type=Not Found, status=404).
No message available

原因是【Application启动类放的位置不对】要将Application放在最外层,也就是要包含所有子包。

如下图

原文地址:https://www.cnblogs.com/suizhikuo/p/8353577.html