diff --git a/extensions/resteasy-classic/resteasy-common/deployment/src/main/java/io/quarkus/resteasy/common/deployment/ResteasyCommonProcessor.java b/extensions/resteasy-classic/resteasy-common/deployment/src/main/java/io/quarkus/resteasy/common/deployment/ResteasyCommonProcessor.java index b78d5eec48b58..d2fcf7fd846d2 100644 --- a/extensions/resteasy-classic/resteasy-common/deployment/src/main/java/io/quarkus/resteasy/common/deployment/ResteasyCommonProcessor.java +++ b/extensions/resteasy-classic/resteasy-common/deployment/src/main/java/io/quarkus/resteasy/common/deployment/ResteasyCommonProcessor.java @@ -58,6 +58,7 @@ import io.quarkus.deployment.builditem.nativeimage.RuntimeInitializedClassBuildItem; import io.quarkus.deployment.builditem.nativeimage.ServiceProviderBuildItem; import io.quarkus.deployment.util.ServiceUtil; +import io.quarkus.resteasy.common.runtime.ResteasyCommonConfig; import io.quarkus.resteasy.common.runtime.ResteasyInjectorFactoryRecorder; import io.quarkus.resteasy.common.runtime.config.ResteasyConfigBuilder; import io.quarkus.resteasy.common.runtime.providers.ServerFormUrlEncodedProvider; @@ -65,10 +66,6 @@ import io.quarkus.resteasy.common.spi.ResteasyDotNames; import io.quarkus.resteasy.common.spi.ResteasyJaxrsProviderBuildItem; import io.quarkus.runtime.RuntimeValue; -import io.quarkus.runtime.annotations.ConfigGroup; -import io.quarkus.runtime.annotations.ConfigItem; -import io.quarkus.runtime.annotations.ConfigRoot; -import io.quarkus.runtime.configuration.MemorySize; public class ResteasyCommonProcessor { @@ -102,31 +99,6 @@ public class ResteasyCommonProcessor { private ResteasyCommonConfig resteasyCommonConfig; - @ConfigRoot(name = "resteasy") - public static final class ResteasyCommonConfig { - /** - * Enable gzip support for REST - */ - public ResteasyCommonConfigGzip gzip; - } - - @ConfigGroup - public static final class ResteasyCommonConfigGzip { - /** - * If gzip is enabled - */ - @ConfigItem - public boolean enabled; - /** - * Maximum deflated file bytes size - *
- * If the limit is exceeded, Resteasy will return Response
- * with status 413("Request Entity Too Large")
- */
- @ConfigItem(defaultValue = "10M")
- public MemorySize maxInput;
- }
-
@BuildStep
void addStaticInitConfigSourceProvider(
Capabilities capabilities,
@@ -164,7 +136,7 @@ void disableDefaultExceptionMapper(BuildProducer
+ * If the limit is exceeded, Resteasy will return Response
+ * with status 413("Request Entity Too Large")
+ */
+ @WithDefault("10M")
+ MemorySize maxInput();
+ }
+
+}
diff --git a/extensions/resteasy-classic/resteasy-server-common/deployment/src/main/java/io/quarkus/resteasy/server/common/deployment/ResteasyServerCommonProcessor.java b/extensions/resteasy-classic/resteasy-server-common/deployment/src/main/java/io/quarkus/resteasy/server/common/deployment/ResteasyServerCommonProcessor.java
index 3dedbf5ee5108..bee18043872b9 100644
--- a/extensions/resteasy-classic/resteasy-server-common/deployment/src/main/java/io/quarkus/resteasy/server/common/deployment/ResteasyServerCommonProcessor.java
+++ b/extensions/resteasy-classic/resteasy-server-common/deployment/src/main/java/io/quarkus/resteasy/server/common/deployment/ResteasyServerCommonProcessor.java
@@ -77,8 +77,8 @@
import io.quarkus.gizmo.Gizmo;
import io.quarkus.jaxrs.spi.deployment.AdditionalJaxRsResourceMethodAnnotationsBuildItem;
import io.quarkus.resteasy.common.deployment.JaxrsProvidersToRegisterBuildItem;
-import io.quarkus.resteasy.common.deployment.ResteasyCommonProcessor.ResteasyCommonConfig;
import io.quarkus.resteasy.common.runtime.QuarkusInjectorFactory;
+import io.quarkus.resteasy.common.runtime.ResteasyCommonConfig;
import io.quarkus.resteasy.common.spi.ResteasyDotNames;
import io.quarkus.resteasy.server.common.runtime.QuarkusResteasyDeployment;
import io.quarkus.resteasy.server.common.spi.AdditionalJaxRsResourceDefiningAnnotationBuildItem;
@@ -421,9 +421,9 @@ public void build(
deploymentCustomizer.getConsumer().accept(deployment);
}
- if (commonConfig.gzip.enabled) {
+ if (commonConfig.gzip().enabled()) {
resteasyInitParameters.put(ResteasyContextParameters.RESTEASY_GZIP_MAX_INPUT,
- Long.toString(commonConfig.gzip.maxInput.asLongValue()));
+ Long.toString(commonConfig.gzip().maxInput().asLongValue()));
}
resteasyInitParameters.put(ResteasyContextParameters.RESTEASY_UNWRAPPED_EXCEPTIONS,
ArcUndeclaredThrowableException.class.getName());
diff --git a/extensions/resteasy-classic/resteasy/runtime/src/main/java/io/quarkus/resteasy/runtime/standalone/ResteasyConfigurationMPConfig.java b/extensions/resteasy-classic/resteasy/runtime/src/main/java/io/quarkus/resteasy/runtime/standalone/ResteasyConfigurationMPConfig.java
index bdf70a82a1603..7c87d6b9426f5 100644
--- a/extensions/resteasy-classic/resteasy/runtime/src/main/java/io/quarkus/resteasy/runtime/standalone/ResteasyConfigurationMPConfig.java
+++ b/extensions/resteasy-classic/resteasy/runtime/src/main/java/io/quarkus/resteasy/runtime/standalone/ResteasyConfigurationMPConfig.java
@@ -67,6 +67,11 @@ public Set