controller扫包报错问题
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放在最外层,也就是要包含所有子包。
如下图
访问不到方法首先要从你的controller能否被扫描到出发,
图中显示创建springboot项目自带的这两个的文件要注意把他俩拿出来放到父包下面也就是图中这个位置。如果你的这两个文件在子包里或者说平级的一个包里就会影响controller无法被扫描到,从而导致无法访问到你的方法