简体   繁体   English

RESTEASY003210:找不到完整路径的资源 - Quarkus

[英]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=trueapplication.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.

相关问题 无法找到 MessageBodyReader - RestEasy / Quarkus - Unable to find a MessageBodyReader - RestEasy / Quarkus 如何在 Quarkus 中为我的 RESTEasy 资源设置基本路径? - How can I set the base path for my RESTEasy resources in Quarkus? 使用 Quarkus 和 Resteasy 从主 controller 外部访问路径参数 - Access path params from outside the main controller with Quarkus and Resteasy Resteasy React 中的 Quarkus Jwt 示例 - Example of Quarkus Jwt in resteasy reactive Quarkus org.jboss.resteasy.spi.UnhandledException:无法找到内容类型应用程序/json 的 MessageBodyReader - Quarkus org.jboss.resteasy.spi.UnhandledException: Unable to find a MessageBodyReader of content-type application/json Quarkus - 忽略 @Path(“/”) 的资源,而是从资源中加载内容 - Quarkus - Resource with @Path(“/”) ignored, instead loading content from resources Jackson 注释 quarkus resteasy 客户端 - Jackson annotations quarkus resteasy client Quarkus Resteasy 反应性缺失构建项目? - Quarkus Resteasy reactive missing builditem? 如何使用 Quarkus 在 RestEasy 中为 MultipartFormDataInput 提供 swagger 注释 - How to provide swagger annotation for MultipartFormDataInput in RestEasy with Quarkus 使用 RESTEasy / Jackson / Quarkus 将 JTS 几何解析为 GeoGSON - Parsing JTS Geometry to GeoGSON with RESTEasy / Jackson / Quarkus
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM