初学Spring-Boot, "Whitelabel Error Page"是很多人碰到的第一个头痛的问题
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Fri Apr 09 13:02:50 CST 2017
There was an unexpected error (type=Internal Server Error, status=500).
No message available
这一般是因为,通过Application无法找到controller造成的。
解决方式如下:
1. Application中需要在包结构的最上层
2. Application中引入注解,并加上Controller的包目录 @ComponentScan(basePackages= {"org.xxxx.ad.controller"})
3. Application上加入注解@SpringBootApplication
4.
Application扩展SpringBootServletInitializer