Decoration5:引入swagger2进行API管理

这一部我们计划把swagger2引入到项目中,把网站的接口以文档的形式展示出来。

1、引入springfox-swagger2、springfox-swagger-ui

2、实现Swagger2

3、http://localhost:8080/swagger-ui.html 

报错:

Whitelabel Error Page

This application has no explicit mapping for /error, so you are seeing this as a fallback.

Wed May 10 21:29:48 CST 2017
There was an unexpected error (type=Not Found, status=404).
No message available

用程序猿DD的源代码尝试也是报相同的错误

用http://localhost:8080/v2/api-docs访问时可以返回结果的,可见是swagger2-ui的资源路径问题

posted @ 2017-05-10 21:54  mingziday  阅读(783)  评论(0编辑  收藏  举报