[英]RESTEASY003210: Could not find resource for full path - Quarkus
I'm trying to configure Swagger in Quarkus.我正在尝试在 Quarkus 中配置 Swagger。 My version of Quarkus: 1.9.2.Final
我的 Quarkus 版本:1.9.2.Final
My dependency:我的依赖:
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-smallrye-openapi</artifactId>
</dependency>
And my properties resources:和我的属性资源:
quarkus.swagger-ui.path=/swagger-ui
quarkus.swagger-ui.always-include=true
When I launch my application with: mvn compile quarkus:dev and go to this url:当我使用以下命令启动我的应用程序时: mvn compile quarkus:dev 并转到此 URL:
http://localhost:8080/swagger-ui_not_found/
A red page with the additional endpoints is shown (ok, this is what I want)显示带有附加端点的红页(好吧,这就是我想要的)
However, if I make a package with maven (mvn package) and then, launch the jar, the same url returns:但是,如果我使用 maven (mvn package) 制作一个包,然后启动 jar,则返回相同的 url:
RESTEASY003210: Could not find resource for full path
This is the trace:这是跟踪:
2020-11-10 07:58:08,244 DEBUG [org.jbo.res.res.i18n] (executor-thread-1) RESTEASY002315: PathInfo: /favicon.ico
2020-11-10 07:58:08,246 DEBUG [org.jbo.res.res.i18n] (executor-thread-1) RESTEASY002305: Failed executing GET /favicon.ico: javax.ws.rs.NotFoundException: RESTEASY003210: Could not find resource for full path: http://localhost:8080/favicon.ico
at org.jboss.resteasy.core.registry.ClassNode.match(ClassNode.java:70)
at org.jboss.resteasy.core.registry.RootClassNode.match(RootClassNode.java:47)
at org.jboss.resteasy.core.ResourceMethodRegistry.getResourceInvoker(ResourceMethodRegistry.java:481)
at org.jboss.resteasy.core.SynchronousDispatcher.getInvoker(SynchronousDispatcher.java:332)
at org.jboss.resteasy.core.SynchronousDispatcher.lambda$invoke$4(SynchronousDispatcher.java:253)
at org.jboss.resteasy.core.SynchronousDispatcher.lambda$preprocess$0(SynchronousDispatcher.java:161)
at org.jboss.resteasy.core.interception.jaxrs.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:364)
I've read in Quarkus guides that if you set:我在Quarkus 指南中读到,如果你设置:
quarkus.swagger-ui.always-include=true quarkus.swagger-ui.always-include=true
You make it available in production too, but in my case It doesn't work.您也可以在生产中使用它,但在我的情况下它不起作用。
Any ideas?有任何想法吗?
Thanks.谢谢。
Are you looking for the swagger-ui page, or the 404 page with the links on ?您是在寻找 swagger-ui 页面,还是带有链接的 404 页面? As far as I know, the 404 with the links is only available in DEV mode.
据我所知,带有链接的 404 仅在 DEV 模式下可用。
By adding quarkus.swagger-ui.always-include=true
to application.properties
, you will get SwaggerUI in the prod-mode jar as well (accessible at http://localhost:8080/swagger-ui/)通过将
quarkus.swagger-ui.always-include=true
到application.properties
,您还将在 prod-mode jar 中获得 SwaggerUI(可在 http://localhost:8080/swagger-ui/ 访问)
See the documentation for more details.有关更多详细信息,请参阅文档。
Also note that this property is a build-time property, therefore changing it at runtime has no effect.另请注意,此属性是构建时属性,因此在运行时更改它无效。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.