Quarkus reasteasy реактивный с составным расширением

#resteasy #multipart #quarkus

Вопрос:

У меня есть приложение, которое использует реактивный стек quarkus, поэтому для вызова внешних служб у меня есть следующие зависимости:

         <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-resteasy-reactive</artifactId>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-resteasy-reactive-jackson</artifactId>
        </dependency>
 

Сейчас я пытаюсь вызвать конечную точку, которая принимает составные данные, поэтому я добавил следующее:

         <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-resteasy-multipart</artifactId>
        </dependency>
 

Однако это, по-видимому, противоречит, так как при создании приложения возникает следующая ошибка:

 021-05-24 18:03:35,706 ERROR [io.qua.dep.dev.IsolatedDevModeMain] (main) Failed to start quarkus: java.lang.RuntimeException: java.lang.IllegalArgumentException: Multiple matching properties for name "security.jaxrs.deny-unannotated-endpoints" property was matched by both public boolean io.quarkus.resteasy.runtime.JaxRsSecurityConfig.denyJaxRs and public boolean io.quarkus.resteasy.reactive.common.runtime.JaxRsSecurityConfig.denyJaxRs. This is likely because you have an incompatible combination of extensions that both define the same properties (e.g. including both reactive and blocking database extensions)
    at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:309)
    at io.quarkus.runner.bootstrap.AugmentActionImpl.createInitialRuntimeApplication(AugmentActionImpl.java:182)
    at io.quarkus.runner.bootstrap.AugmentActionImpl.createInitialRuntimeApplication(AugmentActionImpl.java:59)
    at io.quarkus.deployment.dev.IsolatedDevModeMain.firstStart(IsolatedDevModeMain.java:79)
    at io.quarkus.deployment.dev.IsolatedDevModeMain.accept(IsolatedDevModeMain.java:378)
    at io.quarkus.deployment.dev.IsolatedDevModeMain.accept(IsolatedDevModeMain.java:56)
    at io.quarkus.bootstrap.app.CuratedApplication.runInCl(CuratedApplication.java:127)
    at io.quarkus.bootstrap.app.CuratedApplication.runInAugmentClassLoader(CuratedApplication.java:84)
    at io.quarkus.deployment.dev.DevModeMain.start(DevModeMain.java:144)
    at io.quarkus.deployment.dev.DevModeMain.main(DevModeMain.java:63)
Caused by: java.lang.IllegalArgumentException: Multiple matching properties for name "security.jaxrs.deny-unannotated-endpoints" property was matched by both public boolean io.quarkus.resteasy.runtime.JaxRsSecurityConfig.denyJaxRs and public boolean io.quarkus.resteasy.reactive.common.runtime.JaxRsSecurityConfig.denyJaxRs. This is likely because you have an incompatible combination of extensions that both define the same properties (e.g. including both reactive and blocking database extensions)
    at io.quarkus.deployment.configuration.matching.PatternMapBuilder.addMember(PatternMapBuilder.java:71)
    at io.quarkus.deployment.configuration.matching.PatternMapBuilder.addGroup(PatternMapBuilder.java:60)
    at io.quarkus.deployment.configuration.matching.PatternMapBuilder.makePatterns(PatternMapBuilder.java:35)
    at io.quarkus.deployment.configuration.BuildTimeConfigurationReader.<init>(BuildTimeConfigurationReader.java:116)
    at io.quarkus.deployment.ExtensionLoader.loadStepsFrom(ExtensionLoader.java:143)
    at io.quarkus.deployment.QuarkusAugmentor.run(QuarkusAugmentor.java:101)
    at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:307)
    ... 9 more


 

Я не могу найти реактивную версию для многокомпонентной зависимости. Есть какие-нибудь идеи, как заставить его работать?

Спасибо

Ответ №1:

Вы не можете использовать

     <dependency>
        <groupId>io.quarkus</groupId>
        <artifactId>quarkus-resteasy-multipart</artifactId>
    </dependency>
 

с любым из quarkus-resteasy-reactive расширений.

quarkus-resteasy-reactive уже есть встроенная поддержка нескольких компонентов, см. Это

Комментарии:

1. Конечно, никаких проблем