Quarkus 不在本地机器上招摇

Quarkus not serving swagger on local machine

我正在尝试从我的本地计算机 (windows) 运行 Quarkus。有用。但是,当我转到着陆页时,它并没有招摇。

日志显示:

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 项目 运行s 并且它在 docker 上部署了 / 运行s。我已经找了几天了,但我没有看到解决方案。我查看了主机文件。

我该如何调试它?关于可能出问题的任何提示?我是 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 文件夹并删除了所有 files/folders(OS 允许我删除)。

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

我没有足够的声誉来添加评论,但只想贡献这个主题:在 macOS 上,临时目录不是 /tmp,它是在环境变量 [=11] 上定义的=].