在spring-mvc中使用swagger2遇到的问题汇总
2017-07-17 11:14
441 查看
初次使用swagger2过程中,遇到了一些问题。所以做个笔记。
未解决的问题:框架是同事给的,使用的是maven管理jar。maven导包,按理说导入后在java中可以直接引用jar中的类,但是死活用不了。没办法,重新创建了一个新工程。这个问题就没有复现了。
已解决:
问题描述:
Unable to infer base url. This is common when using dynamic servlet registration or when the API is behind an API Gateway. The base url is the root of where all the swagger resources are served. For e.g. if the api is available at http://example.org/api/v2/api-docs then the base url is http://example.org/api/. Please enter the location manually:
截图:
解决:在web.xml中少了这句话。
未解决的问题:框架是同事给的,使用的是maven管理jar。maven导包,按理说导入后在java中可以直接引用jar中的类,但是死活用不了。没办法,重新创建了一个新工程。这个问题就没有复现了。
已解决:
问题描述:
Unable to infer base url. This is common when using dynamic servlet registration or when the API is behind an API Gateway. The base url is the root of where all the swagger resources are served. For e.g. if the api is available at http://example.org/api/v2/api-docs then the base url is http://example.org/api/. Please enter the location manually:
截图:
解决:在web.xml中少了这句话。
<listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener>
相关文章推荐
- mybatie+spring+mvc使用反射遇到的问题
- SSH网站开发遇到的问题汇总SpringMVC+Spring+Hibernate
- 搭建springMVC+Mybatis的Maven项目过程中遇到的问题汇总。
- Spring+SpringMVC+MyBatis遇到的所有问题汇总
- REVIT使用中遇到的各种问题汇总
- MVC 在IIS6,7中部署遇到问题汇总
- 使用10.04过程中遇到了很多中文问题,都解决了,汇总下来供大家参考
- 视频监控(B/S模式下)CGI和BOA使用期间遇到的问题汇总
- 使用 spring aop 在DispatchAction中遇到的问题
- MVC3开发常常遇到的问题及常常使用到的代码片段
- 视频监控(B/S模式下)CGI和BOA使用期间遇到的问题汇总
- spring mvc使用过程中关于spring:bind和绑定java.util.Date遇到的问题
- 记从安装centos系统在到使用mono3.2部署MVC过程遇到的问题
- 装好CGAL后,使用example遇到的问题汇总
- CGI和BOA使用期间遇到的问题汇总(转)
- asp.net mvc 2 简简单单做开发 使用DataContext扩展方法Find<TEntity>(TEntity obj) 遇到的问题
- Spring3 MVC使用@ResponseBody的乱码问题及解决办法
- CGI和BOA使用期间遇到的问题汇总
- 使用ASP.NET MVC 2编程时遇到的两个小问题
- flashdevelop使用中遇到的问题汇总