java - swagger-ui.html 在 Vaadin + Spring 应用程序中显示空白页面
问题描述
在我的 Spring+Vaadin (18) 应用程序中,我配置了这个:
vaadin.url-mapping=/ui/*
所有 Vaadin 视图都可以通过“localhost:8080/ui/something”地址访问。
在 pom 中,我有 Swagger UI 所需的依赖项:
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-ui</artifactId>
<version>${springdoc.version}</version>
</dependency>
但是 swagger-ui 页面通过浏览到 http://localhost:8080/swagger-ui.html 会返回完整的空白,并显示以下控制台输出,它会自动重定向到 http://localhost:8080/swagger-ui/index.html/ ?configUrl=/v3/api-docs/swagger-config。
OpenAPI JSON 页面可在 http://localhost:8080/v3/api-docs/ 上访问
知道为什么不显示 Swagger UI 页面吗?
解决方案
推荐阅读
- python - 如何使用for循环删除数据框中的行
- python - 如何在驱动程序 selenium python 中设置引用者?
- python - 如何删除第一行号列熊猫?
- arrays - 评估COM接口返回的非变量数组导致的VBScript类型不匹配错误可以通过更改语言来解决吗?
- git - Git:撤消所有直到分支开始
- unity3d - 如何在场景中的另一个位置复制实时 3D 对象?
- sql - 计算重复状态的迭代次数
- python-3.x - 如何将此脚本放入函数中?
- google-bigquery - 为什么我的 Stackdriver 导出接收器仅将最新的审核日志加载到 BigQuery 中而没有历史记录?
- server - 无法读取未定义的属性“getCompilationErrors”