Skip to content

fix: use Http2ClientConfiguration.PREFIX for ServiceHttp2ClientConfiguration#12625

Open
funsaized wants to merge 1 commit into
micronaut-projects:5.0.xfrom
funsaized:fix/service-http2-configuration-properties-prefix
Open

fix: use Http2ClientConfiguration.PREFIX for ServiceHttp2ClientConfiguration#12625
funsaized wants to merge 1 commit into
micronaut-projects:5.0.xfrom
funsaized:fix/service-http2-configuration-properties-prefix

Conversation

@funsaized
Copy link
Copy Markdown

@funsaized funsaized commented Apr 21, 2026

Summary

The @ConfigurationProperties annotation on ServiceHttp2ClientConfiguration (a nested class inside ServiceHttpClientConfiguration) was referencing WebSocketCompressionConfiguration.PREFIX ("ws.compression") instead of Http2ClientConfiguration.PREFIX ("http2").

This appears to be a copy-paste slip from the adjacent ServiceWebSocketCompressionConfiguration class, and causes the nested HTTP/2 client configuration for per-service clients to bind under the wrong property path (and collide with the WebSocket compression configuration prefix).

Change

-    @ConfigurationProperties(WebSocketCompressionConfiguration.PREFIX)
+    @ConfigurationProperties(Http2ClientConfiguration.PREFIX)
     public static class ServiceHttp2ClientConfiguration extends Http2ClientConfiguration {
     }

This aligns ServiceHttp2ClientConfiguration with its parent class Http2ClientConfiguration (PREFIX = "http2"), consistent with how the sibling pool/compression/ssl nested configurations use their respective parent-class prefixes.

Reference

Fixes #12620

@cla-assistant
Copy link
Copy Markdown

cla-assistant Bot commented Apr 21, 2026

CLA assistant check
All committers have signed the CLA.

…uration

The `@ConfigurationProperties` annotation on `ServiceHttp2ClientConfiguration`
was referencing `WebSocketCompressionConfiguration.PREFIX` ("ws.compression")
instead of `Http2ClientConfiguration.PREFIX` ("http2"), likely a copy-paste
error from the adjacent `ServiceWebSocketCompressionConfiguration` class.

This caused the nested HTTP/2 client configuration for per-service clients
(`micronaut.http.services.<name>.http2.*`) to bind under the wrong property
path and collide with the WebSocket compression configuration prefix.

Fixes micronaut-projects#12620
@funsaized funsaized force-pushed the fix/service-http2-configuration-properties-prefix branch from d6c105a to 20ef268 Compare April 21, 2026 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Invalid @ConfigurationProperties for the class ServiceHttp2ClientConfiguration

1 participant