微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Quarkus 不在本地机器上提供 swagger

如何解决Quarkus 不在本地机器上提供 swagger

我正在尝试从我的本地机器(Windows)运行 Quarkus。有用。但是,当我进入着陆页时,它不会提供 swagger。

日志显示

21:29:04 INFO  [io.quarkus] (Quarkus Main Thread) Profile dev activated. Live Coding activated.
21:29:04 INFO  [io.quarkus] (Quarkus Main Thread) Installed features: [agroal,cdi,hibernate-orm,hibernate-validator,micrometer,mutiny,narayana-jta,resteasy,resteasy-jackson,smallrye-context-propagation,smallrye-health,smallrye-openapi,swagger-ui,vertx,vertx-web]
21:29:30 INFO  [io.qua.htt.access-log] (vert.x-eventloop-thread-10) 127.0.0.1 - - 20/Jan/2021:21:29:30 +0100 "GET /gm/gmw-v1.1/swagger-ui HTTP/1.1" 302 -
21:29:30 INFO  [io.qua.htt.access-log] (executor-thread-3) 127.0.0.1 - - 20/Jan/2021:21:29:30 +0100 "GET /gm/gmw-v1.1/swagger-ui/style.css HTTP/1.1" 404 -
21:29:30 INFO  [io.qua.htt.access-log] (executor-thread-4) 127.0.0.1 - - 20/Jan/2021:21:29:30 +0100 "GET /gm/gmw-v1.1/swagger-ui/theme-feeling-blue.css HTTP/1.1" 404 -
21:29:30 INFO  [io.qua.htt.access-log] (executor-thread-5) 127.0.0.1 - - 20/Jan/2021:21:29:30 +0100 "GET /gm/gmw-v1.1/swagger-ui/swagger-ui-bundle.js HTTP/1.1" 404 -
21:29:30 INFO  [io.qua.htt.access-log] (executor-thread-2) 127.0.0.1 - - 20/Jan/2021:21:29:30 +0100 "GET /gm/gmw-v1.1/swagger-ui/swagger-ui.css HTTP/1.1" 404 -
21:29:30 INFO  [io.qua.htt.access-log] (executor-thread-1) 127.0.0.1 - - 20/Jan/2021:21:29:30 +0100 "GET /gm/gmw-v1.1/swagger-ui/swagger-ui-standalone-preset.js HTTP/1.1" 404 -

可能有一些明显的东西。它显示了 openapi 的下载对话框和我定义的其余调用,它们可以正常工作。

完全相同的 maven 项目在我同事的机器上运行,它在 docker 上部署/运行。我已经找了几天了,但我没有看到解决方案。我查看了主机文件

我该如何调试?关于可能出错的任何提示?我是 Quarkus 的新手(只是忙着找路)

完整日志:

2:59:36 DEBUG [io.qua.mic.run.bin.ver.VertxHttpServerMetrics] (vert.x-eventloop-thread-13) requestBegin /gm/gmw-v1.1/swagger-ui: {CONNECTED_SOCKET_SAMPLE=io.micrometer.core.instrument.composite.CompositeLongTasktimer$CompositeSample@2041381},io.quarkus.micrometer.runtime.binder.vertx.RequestMetric@2cc5a745
22:59:36 DEBUG [io.qua.mic.run.bin.ver.VertxHttpServerMetrics] (vert.x-eventloop-thread-13) responseEnd: io.quarkus.micrometer.runtime.binder.vertx.RequestMetric@2cc5a745,io.vertx.core.http.impl.HttpServerResponseImpl@41ed01b5
22:59:36 DEBUG [io.qua.mic.run.bin.ver.VertxHttpServerMetrics] (vert.x-eventloop-thread-13) requestBegin /gm/gmw-v1.1/swagger-ui/swagger-ui.css: {CONNECTED_SOCKET_SAMPLE=io.micrometer.core.instrument.composite.CompositeLongTasktimer$CompositeSample@2041381},io.quarkus.micrometer.runtime.binder.vertx.RequestMetric@5e89e630
22:59:36 DEBUG [io.qua.mic.run.bin.ver.VertxHttpServerMetrics] (vert.x-eventloop-thread-4) requestBegin /gm/gmw-v1.1/swagger-ui/theme-feeling-blue.css: {CONNECTED_SOCKET_SAMPLE=io.micrometer.core.instrument.composite.CompositeLongTasktimer$CompositeSample@4c7b1d36},io.quarkus.micrometer.runtime.binder.vertx.RequestMetric@40364d3a
22:59:36 DEBUG [io.qua.mic.run.bin.ver.VertxHttpServerMetrics] (vert.x-eventloop-thread-0) requestBegin /gm/gmw-v1.1/swagger-ui/style.css: {CONNECTED_SOCKET_SAMPLE=io.micrometer.core.instrument.composite.CompositeLongTasktimer$CompositeSample@2582ead0},io.quarkus.micrometer.runtime.binder.vertx.RequestMetric@5b247e88
22:59:36 DEBUG [io.qua.mic.run.bin.ver.VertxHttpServerMetrics] (vert.x-eventloop-thread-14) requestBegin /gm/gmw-v1.1/swagger-ui/swagger-ui-bundle.js: {CONNECTED_SOCKET_SAMPLE=io.micrometer.core.instrument.composite.CompositeLongTasktimer$CompositeSample@2a0e7a80},io.quarkus.micrometer.runtime.binder.vertx.RequestMetric@686abd43
22:59:36 DEBUG [io.qua.mic.run.bin.ver.VertxHttpServerMetrics] (vert.x-eventloop-thread-1) requestBegin /gm/gmw-v1.1/swagger-ui/swagger-ui-standalone-preset.js: {CONNECTED_SOCKET_SAMPLE=io.micrometer.core.instrument.composite.CompositeLongTasktimer$CompositeSample@718a2eb0},io.quarkus.micrometer.runtime.binder.vertx.RequestMetric@5a754f7f
22:59:36 DEBUG [io.qua.ver.htt.run.ForwardedParser] (executor-thread-1) Recalculated absoluteURI to http://localhost:8080/gm/gmw-v1.1/swagger-ui/style.css
22:59:36 DEBUG [org.jbo.res.res.i18n] (executor-thread-1) RESTEASY002315: PathInfo: /swagger-ui/style.css
22:59:36 DEBUG [org.jbo.res.res.i18n] (executor-thread-1) {text/css=org.jboss.resteasy.core.request.QualityValue@3e8,*/*=org.jboss.resteasy.core.request.QualityValue@64}
22:59:36 DEBUG [io.qua.mic.run.bin.ver.VertxHttpServerMetrics] (executor-thread-1) responseEnd: io.quarkus.micrometer.runtime.binder.vertx.RequestMetric@5b247e88,io.vertx.core.http.impl.HttpServerResponseImpl@37a17692
22:59:36 INFO  [io.qua.htt.access-log] (executor-thread-1) 127.0.0.1 - - 20/Jan/2021:22:59:36 +0100 "GET /gm/gmw-v1.1/swagger-ui/style.css HTTP/1.1" 404 -
22:59:36 DEBUG [io.qua.ver.htt.run.ForwardedParser] (executor-thread-6) Recalculated absoluteURI to http://localhost:8080/gm/gmw-v1.1/swagger-ui/theme-feeling-blue.css
22:59:36 DEBUG [org.jbo.res.res.i18n] (executor-thread-6) RESTEASY002315: PathInfo: /swagger-ui/theme-feeling-blue.css
22:59:36 DEBUG [org.jbo.res.res.i18n] (executor-thread-6) {text/css=org.jboss.resteasy.core.request.QualityValue@3e8,*/*=org.jboss.resteasy.core.request.QualityValue@64}
22:59:36 DEBUG [io.qua.ver.htt.run.ForwardedParser] (executor-thread-1) Recalculated absoluteURI to http://localhost:8080/gm/gmw-v1.1/swagger-ui/swagger-ui-standalone-preset.js
22:59:36 DEBUG [io.qua.mic.run.bin.ver.VertxHttpServerMetrics] (executor-thread-6) responseEnd: io.quarkus.micrometer.runtime.binder.vertx.RequestMetric@40364d3a,io.vertx.core.http.impl.HttpServerResponseImpl@4ba14ca1
22:59:36 DEBUG [org.jbo.res.res.i18n] (executor-thread-1) RESTEASY002315: PathInfo: /swagger-ui/swagger-ui-standalone-preset.js
22:59:36 INFO  [io.qua.htt.access-log] (executor-thread-6) 127.0.0.1 - - 20/Jan/2021:22:59:36 +0100 "GET /gm/gmw-v1.1/swagger-ui/theme-feeling-blue.css HTTP/1.1" 404 -
22:59:36 DEBUG [org.jbo.res.res.i18n] (executor-thread-1) {*/*=org.jboss.resteasy.core.request.QualityValue@3e8}
22:59:36 DEBUG [io.qua.ver.htt.run.ForwardedParser] (executor-thread-6) Recalculated absoluteURI to http://localhost:8080/gm/gmw-v1.1/swagger-ui/swagger-ui.css
22:59:36 DEBUG [org.jbo.res.res.i18n] (executor-thread-6) RESTEASY002315: PathInfo: /swagger-ui/swagger-ui.css
22:59:36 DEBUG [org.jbo.res.res.i18n] (executor-thread-6) {text/css=org.jboss.resteasy.core.request.QualityValue@3e8,*/*=org.jboss.resteasy.core.request.QualityValue@64}
22:59:36 DEBUG [io.qua.mic.run.bin.ver.VertxHttpServerMetrics] (executor-thread-1) responseEnd: io.quarkus.micrometer.runtime.binder.vertx.RequestMetric@5a754f7f,io.vertx.core.http.impl.HttpServerResponseImpl@9eb2123
22:59:36 DEBUG [io.qua.mic.run.bin.ver.VertxHttpServerMetrics] (executor-thread-6) responseEnd: io.quarkus.micrometer.runtime.binder.vertx.RequestMetric@5e89e630,io.vertx.core.http.impl.HttpServerResponseImpl@911f62c
22:59:36 INFO  [io.qua.htt.access-log] (executor-thread-6) 127.0.0.1 - - 20/Jan/2021:22:59:36 +0100 "GET /gm/gmw-v1.1/swagger-ui/swagger-ui.css HTTP/1.1" 404 -
22:59:36 INFO  [io.qua.htt.access-log] (executor-thread-1) 127.0.0.1 - - 20/Jan/2021:22:59:36 +0100 "GET /gm/gmw-v1.1/swagger-ui/swagger-ui-standalone-preset.js HTTP/1.1" 404 -
22:59:36 DEBUG [io.qua.ver.htt.run.ForwardedParser] (executor-thread-7) Recalculated absoluteURI to http://localhost:8080/gm/gmw-v1.1/swagger-ui/swagger-ui-bundle.js
22:59:36 DEBUG [org.jbo.res.res.i18n] (executor-thread-7) RESTEASY002315: PathInfo: /swagger-ui/swagger-ui-bundle.js
22:59:36 DEBUG [org.jbo.res.res.i18n] (executor-thread-7) {*/*=org.jboss.resteasy.core.request.QualityValue@3e8}
22:59:36 DEBUG [io.qua.mic.run.bin.ver.VertxHttpServerMetrics] (executor-thread-7) responseEnd: io.quarkus.micrometer.runtime.binder.vertx.RequestMetric@686abd43,io.vertx.core.http.impl.HttpServerResponseImpl@7ba23767
22:59:36 INFO  [io.qua.htt.access-log] (executor-thread-7) 127.0.0.1 - - 20/Jan/2021:22:59:36 +0100 "GET /gm/gmw-v1.1/swagger-ui/swagger-ui-bundle.js HTTP/1.1" 404 -
22:59:36 DEBUG [io.qua.mic.run.bin.ver.VertxHttpServerMetrics] (vert.x-eventloop-thread-13) requestBegin /gm/gmw-v1.1/swagger-ui/swagger-ui-standalone-preset.js: {CONNECTED_SOCKET_SAMPLE=io.micrometer.core.instrument.composite.CompositeLongTasktimer$CompositeSample@2041381},io.quarkus.micrometer.runtime.binder.vertx.RequestMetric@35450f9e
22:59:36 DEBUG [io.qua.ver.htt.run.ForwardedParser] (executor-thread-7) Recalculated absoluteURI to http://localhost:8080/gm/gmw-v1.1/swagger-ui/swagger-ui-standalone-preset.js
22:59:36 DEBUG [org.jbo.res.res.i18n] (executor-thread-7) RESTEASY002315: PathInfo: /swagger-ui/swagger-ui-standalone-preset.js
22:59:36 DEBUG [org.jbo.res.res.i18n] (executor-thread-7) {*/*=org.jboss.resteasy.core.request.QualityValue@3e8}
22:59:36 DEBUG [io.qua.mic.run.bin.ver.VertxHttpServerMetrics] (executor-thread-7) responseEnd: io.quarkus.micrometer.runtime.binder.vertx.RequestMetric@35450f9e,io.vertx.core.http.impl.HttpServerResponseImpl@21e48dcf
22:59:36 INFO  [io.qua.htt.access-log] (executor-thread-7) 127.0.0.1 - - 20/Jan/2021:22:59:36 +0100 "GET /gm/gmw-v1.1/swagger-ui/swagger-ui-standalone-preset.js HTTP/1.1" 404 -
22:59:36 DEBUG [io.qua.mic.run.bin.ver.VertxHttpServerMetrics] (vert.x-eventloop-thread-13) requestBegin /gm/gmw-v1.1/swagger-ui/favicon.ico: {CONNECTED_SOCKET_SAMPLE=io.micrometer.core.instrument.composite.CompositeLongTasktimer$CompositeSample@2041381},io.quarkus.micrometer.runtime.binder.vertx.RequestMetric@7d2b0755
22:59:36 DEBUG [io.qua.mic.run.bin.ver.VertxHttpServerMetrics] (vert.x-eventloop-thread-13) requestReset: io.quarkus.micrometer.runtime.binder.vertx.RequestMetric@7d2b0755
22:59:36 DEBUG [io.qua.ver.htt.run.ForwardedParser] (vert.x-eventloop-thread-13) Recalculated absoluteURI to http://localhost:8080/gm/gmw-v1.1/swagger-ui/favicon.ico
22:59:36 INFO  [io.qua.htt.access-log] (vert.x-eventloop-thread-13) 127.0.0.1 - - 20/Jan/2021:22:59:36 +0100 "GET /gm/gmw-v1.1/swagger-ui/favicon.ico HTTP/1.1" 200 -
22:59:36 DEBUG [org.jbo.res.res.i18n] (executor-thread-7) RESTEASY002315: PathInfo: /swagger-ui/favicon.ico
22:59:36 DEBUG [org.jbo.res.res.i18n] (executor-thread-7) {image/webp=org.jboss.resteasy.core.request.QualityValue@3e8,*/*=org.jboss.resteasy.core.request.QualityValue@3e8}
22:59:36 DEBUG [io.qua.mic.run.bin.ver.VertxHttpServerMetrics] (executor-thread-7) responseEnd: io.quarkus.micrometer.runtime.binder.vertx.RequestMetric@7d2b0755,io.vertx.core.http.impl.HttpServerResponseImpl@5009f63c

解决方法

我找到了解决方案。 Quarkus 似乎将其网络资源存储在 /tmp 文件夹中(请参阅:https://github.com/quarkusio/quarkus/issues/12577)。我转到 git-bash 中的 /tmp 文件夹,然后删除了所有文件/文件夹(操作系统允许我删除)。

瞧,在那之后它就开始工作了。

,

我没有足够的声望来添加评论,但只想为这个主题做出贡献:在 macOS 上,临时目录不是 /tmp,它是在环境变量 $TMPDIR 上定义的.

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其他元素将获得点击?
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。)
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbcDriver发生异常。为什么?
这是用Java进行XML解析的最佳库。
Java的PriorityQueue的内置迭代器不会以任何特定顺序遍历数据结构。为什么?
如何在Java中聆听按键时移动图像。
Java“Program to an interface”。这是什么意思?