swagger无法显示biz项目接口

Blade 未结 1 680
jkme1987
jkme1987 剑圣 2021-09-18 11:40

一、该问题的重现步骤是什么?

  1. 创建biz项目,包名为com.ndzk.mall,启动对应的company  goods模块在BladeX 接口文档系统中为出现对应的接口文档

  2. 配置如下image.png

image.png

image.png

image.png

image.png

二、你期待的结果是什么?实际看到的又是什么?

期待的结果:接口文档正确显示

实际看到:未显示接口文档

三、你正在使用的是什么产品,什么版本?在什么操作系统上?

商业版   2.8.1RELEASE  win10

四、请提供详细的错误堆栈信息,这很重要。

2021-09-18 11:27:06.452  INFO 34812 --- [ XNIO-1 task-24] c.g.x.k.aggre.core.RouteDispatcher       : 目标请求Url:http://127.0.0.1/blade-mall-goods/v2/api-docs,请求类型:GET,Host:127.0.0.1

2021-09-18 11:27:06.453  INFO 34812 --- [ XNIO-1 task-24] c.g.x.k.a.c.e.ApacheClientExecutor       : ApacheClient Uri:http://127.0.0.1/blade-mall-goods/v2/api-docs

2021-09-18 11:27:06.485  INFO 34812 --- [ XNIO-1 task-24] c.g.x.k.aggre.core.RouteDispatcher       : 响应类型:application/json;charset=UTF-8,响应编码:UTF-8

2021-09-18 11:27:06.489  INFO 34812 --- [ XNIO-1 task-24] c.g.x.k.a.c.f.Knife4jRouteProxyFilter    : 执行完毕

2021-09-18 11:27:07.554  INFO 34812 --- [ XNIO-1 task-27] c.g.x.k.a.c.f.Knife4jRouteProxyFilter    : Current Request:/blade-mall-goods/v2/api-docs

2021-09-18 11:27:07.555  INFO 34812 --- [ XNIO-1 task-27] c.g.x.k.a.c.f.Knife4jRouteProxyFilter    : 当前请求是Proxy请求

2021-09-18 11:27:07.555  INFO 34812 --- [ XNIO-1 task-27] c.g.x.k.aggre.core.RouteDispatcher       : 目标请求Url:http://127.0.0.1/blade-mall-goods/v2/api-docs,请求类型:GET,Host:127.0.0.1

2021-09-18 11:27:07.559  INFO 34812 --- [ XNIO-1 task-27] c.g.x.k.a.c.e.ApacheClientExecutor       : ApacheClient Uri:http://127.0.0.1/blade-mall-goods/v2/api-docs

2021-09-18 11:27:07.586  INFO 34812 --- [ XNIO-1 task-27] c.g.x.k.aggre.core.RouteDispatcher       : 响应类型:application/json;charset=UTF-8,响应编码:UTF-8

2021-09-18 11:27:07.591  INFO 34812 --- [ XNIO-1 task-27] c.g.x.k.a.c.f.Knife4jRouteProxyFilter    : 执行完毕

2021-09-18 11:36:00.719  INFO 34812 --- [ XNIO-1 task-60] c.g.x.k.a.c.f.Knife4jRouteProxyFilter    : Current Request:/blade-mall-company/v2/api-docs

2021-09-18 11:36:00.719  INFO 34812 --- [ XNIO-1 task-60] c.g.x.k.a.c.f.Knife4jRouteProxyFilter    : 当前请求是Proxy请求

2021-09-18 11:36:00.719  INFO 34812 --- [ XNIO-1 task-60] c.g.x.k.aggre.core.RouteDispatcher       : 目标请求Url:http://127.0.0.1/blade-mall-company/v2/api-docs,请求类型:GET,Host:127.0.0.1

2021-09-18 11:36:00.721  INFO 34812 --- [ XNIO-1 task-60] c.g.x.k.a.c.e.ApacheClientExecutor       : ApacheClient Uri:http://127.0.0.1/blade-mall-company/v2/api-docs

2021-09-18 11:36:00.746  INFO 34812 --- [ XNIO-1 task-60] c.g.x.k.aggre.core.RouteDispatcher       : 响应类型:application/json;charset=UTF-8,响应编码:UTF-8

2021-09-18 11:36:00.747  INFO 34812 --- [ XNIO-1 task-60] c.g.x.k.a.c.f.Knife4jRouteProxyFilter    : 执行完毕


1条回答
  • 2021-09-22 15:48

    在biz或者bladex都是一样的,blade-swagger服务现在就是做的转发,只要服务能够访问并且swagger有api数据返回就会正确显示。

    感觉你应该是包扫描没有配置好所以数据为空。

    你加上如下配置再试试

    swagger:
      base-packages:
        - org.springblade
        - com.ndzk.mall


    0 讨论(0)
提交回复