Unable to infer base url. This is common when using dynamic servlet registration or when the API is(
Posted 闲言_
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Unable to infer base url. This is common when using dynamic servlet registration or when the API is(相关的知识,希望对你有一定的参考价值。
错误产生环境
SpringBoot 整合 Swagger2,配置扫描接口和配置是否启用swagger2是产生
判断swagger2 在生产环境下才能使用
- 获取当当前的环境,判断是不是生产环境
- 如果是则启用swagger2 如果不是则不开启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:
错误原因
我已经启用开发环境了
但是访问swagger 的时候一值一直弹出提示,
原因是我开发环境端口是8081 我却一直访问默认的端口 8080 从而导致一直弹出弹窗
解决办法
访问8081端口
以上是关于Unable to infer base url. This is common when using dynamic servlet registration or when the API is(的主要内容,如果未能解决你的问题,请参考以下文章
springboot 中访问swagger提示Unable to infer base url.This is common when using dynamic
转:springboot 与swagger整合出现Unable to infer base url.This is common when using dynamic的解决办法
Unable to infer base url. This is common when using dynamic servlet registration or when the API is
Unable to infer base url. This is common when using dynamic servlet registration or when the API is(
spark读取parquet文件报错:Unable to infer schema when loading Parquet file