No mapping found for HTTP request with URI [/swagger-ui.html]

2019年8月20日18:45:23

  • No mapping found for HTTP request with URI [/swagger-ui.html] in DispatcherServlet with name ‘dispatcherServlet’
  • This application has no explicit mapping for/error, so you are seeing this as a fallback.
  • 今天整合spring boot与 swagger2时发生的错误,如下图

《No mapping found for HTTP request with URI [/swagger-ui.html]》

《No mapping found for HTTP request with URI [/swagger-ui.html]》

  • 最终找到了原因,因为最开始继承了WebMvcConfigurerAdapter,idea提示过时了,就换了WebMvcConfigurationSupport进行继承,所以才导致了如上的错误,最后如果不想继承过时类可实现接口WebMvcConfigurer也可以解决问题
    原文作者:冰石头
    原文地址: https://segmentfault.com/a/1190000020132246
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞