swagger - Swagger /v2/apo-docs 插入标签
问题描述
当我访问我的 http://localhost:8080/v2/api-docs 时,我得到了这个响应<Json>{"swagger":"2.0","info":{"description".....</Json>
这是一个无效的 json 响应,因为<Json>...</Json>
标签。我该如何解决这个问题?
我正在使用 Spring Boot 和这个依赖项:
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<scope>compile</scope>
</dependency>
<!-- Complete with project dependencies -->
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-xml</artifactId>
<version>2.9.9</version>
</dependency>
也许 jackson-dataformat-xml 干扰了输出?
我需要一个有效的 json 响应。
提前致谢。
解决方案
推荐阅读
- c# - c#使用对象方法而不转换它
- django - Django 找不到我的静态文件目录
- updates - 在 Fedora 30 上运行“dnf update”时出现 libnfsidmap 文件冲突
- java - 如何使用 JPA 或 JDBC 使用 REF_CURSOR 调用 PL/SQL 函数
- php - 从计费运输中删除 p 和 span 包装器并形成 woocommerce
- c++ - 尝试获取文件路径时无效定义错误
- intellij-idea - 编辑自定义属性对我不起作用,如何解决 PyCharm 中配置限制的问题?
- rust - Sort HashMap data by keys
- postgresql - 如何在 postgres 中将现有的 COLUMN 类型更改为 SERIAL?
- macros - 将字符串插值传递给宏