Springboot应用静态资源不能访问,报“This application has no explicit mapping for /error”

问题:

Springboot应用静态资源不能访问,例如html, css, js, jpg等文件不能访问。页面显示:

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

解决:

Swagger继承于WebMvcConfigurationSupport,覆盖了缺省配置,应将该类去除。
posted @ 2018-01-23 15:05  hongweigg  阅读(35)  评论(0编辑  收藏  举报