异常一:ApplicationContext is unlikely to start due to a @ComponentScan of the default package
解决:ApplicationContext 不能从一个组件的默认包启动(启动类不能放在默认的包下)
启动类 创建个包即可以正常启动;
异常二:This application has no explicit mapping for /error, so you are seeing this as a fallback.
Tue Feb 13 10:46:50 CST 2018
There was an unexpected error (type=Not Found, status=404).
No message available
解决:看似是404 找不到页面;
如果确定访问路径确实没有问题;关注下启动类的包位置,必须放置在包的根层;
举例:
有问题: 正确的: