Invalid mapping pattern detected: /**/swagger-ui/**(检测到无效的映射模式:/**/swagger-ui/**)
问题描述
我正在将 springdoc-openapi-ui 用于 Spring Boot API 文档并面临以下问题 -
I am using springdoc-openapi-ui for spring boot API documentation and facing the following issue -
我已经添加了所有必要的配置如下 -
I have added all the necessary configuration as follows -
- maven 依赖 -
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-ui</artifactId>
<version>1.5.2</version>
</dependency>
- 这是主文件 -
package com.abc.tl;
import io.swagger.v3.oas.annotations.OpenAPIDefinition;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
@OpenAPIDefinition
public class TLApplication {
public static void main(String[] args) {
SpringApplication.run(TLApplication.class, args);
}
}
使用java版本-11,不确定问题出在哪里,项目无法运行.
Using java version - 11, Not sure where is the Issue, the project is not able to run.
推荐答案
通过以下依赖,解决了这个问题.
With following dependencies, solved this issue.
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.6.0</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-ui</artifactId>
<version>1.5.12</version>
</dependency>
这篇关于检测到无效的映射模式:/**/swagger-ui/**的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:检测到无效的映射模式:/**/swagger-ui/**


- 获取数字的最后一位 2022-01-01
- 未找到/usr/local/lib 中的库 2022-01-01
- java.lang.IllegalStateException:Bean 名称“类别"的 BindingResult 和普通目标对象都不能用作请求属性 2022-01-01
- Eclipse 的最佳 XML 编辑器 2022-01-01
- 如何使 JFrame 背景和 JPanel 透明且仅显示图像 2022-01-01
- 在 Java 中,如何将 String 转换为 char 或将 char 转换 2022-01-01
- GC_FOR_ALLOC 是否更“严重"?在调查内存使用情况时? 2022-01-01
- 如何指定 CORS 的响应标头? 2022-01-01
- 转换 ldap 日期 2022-01-01
- 将 Java Swing 桌面应用程序国际化的最佳实践是什么? 2022-01-01