swagger与spring-context-indexer冲突

swagger是一款非常流行的接口管理工具;
spring-context-indexer可以用来给本地启动SpringBoot缓存加速;

但是两者同时使用时会导致swagger页面打开弹窗报错,报错如下:

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: 

解决方式:去掉pom中的spring-context-indexer依赖

你可能感兴趣的:(遇到的坑,SpringBoot,故障分析,spring,java,servlet)