Skip to content

Configuration metadata mismatch for 'spring.http.serviceclient.{group}.apiversion.default-version' #48611

Closed as not planned

Description

@libedi

Summary

In Spring Boot 4.0.1, there appears to be a mismatch between the Spring Configuration Metadata and the actual property binding behavior for the API version configuration of HttpClientProperties.

The generated configuration metadata advertises the following property:

spring.http.serviceclient.{group}.apiversion.default-version

However, this property does not bind correctly at runtime.

Environment

  • Spring Boot version: 4.0.1
  • Spring Tools for Eclipse 5.0.0.RELEASE

Actual Behavior

The underlying configuration class org.springframework.boot.http.client.autoconfigure.ApiversionProperties defines the field as follows:

@Name("default")
private String defaultVersion;

Because of the @Name("default") annotation, the effective property that binds correctly is:

spring.http.serviceclient.{group}.apiversion.default

Using default-version (as suggested by the configuration metadata) has no effect.

Expected Behavior

The configuration metadata and the actual binding behavior should be consistent.

One of the following should be true:

  • The configuration metadata should advertise:
    spring.http.serviceclient.{group}.apiversion.default
  • or
  • The @Name("default") annotation should be aligned with the documented metadata key (default-version)

Impact

  • Users relying on IDE auto-completion or metadata-based configuration guidance may configure the wrong property.
  • This results in silent misconfiguration, as no error or warning is raised.
  • The issue is not easily discoverable without inspecting the source code.

Suggested Fix

  • Align the Spring configuration metadata with the actual property name used for binding, or adjust the property binding annotation to match the documented metadata key.

Activity

  1. added
    status: waiting-for-triage
    on Dec 24, 2025
  2. changed the title [-]Configuration metadata mismatch for `spring.http.serviceclient.{group}.apiversion.default-version`[/-] [+]Configuration metadata mismatch for 'spring.http.serviceclient.{group}.apiversion.default-version'[/+] on Dec 24, 2025
  3. snicoll commented on Dec 24, 2025

    @snicoll
    Member

    The generated configuration metadata advertises the following property:

    What generated configuration metadata? There is no generated configuration metadata for Lists or Maps. I think the problem is that a POJO is being used as both a root and as a target of a complex type.

    This is a mistake from a dependency metadata perspective as it's the first time we're mixing such constraints in both of those target. Which IDE are you using?

  4. added
    status: waiting-for-feedback
    on Dec 24, 2025
  5. lian220 commented on Dec 24, 2025

    @lian220

    'm interested in working on this issue. Should I wait for triage to complete, or can I start investigating?

  6. added
    status: feedback-provided
    and removed
    status: waiting-for-feedback
    on Dec 24, 2025
  7. snicoll commented on Dec 24, 2025

    @snicoll
    Member

    Thanks for the offer @lian220. Issues waiting-for-triage and/or assigned to someone aren't open for contributions. In this particular case, it's unclear what we want to do (if something at all).

  8. added
    status: waiting-for-feedback
    and removed
    status: feedback-provided
    on Dec 24, 2025
  9. snicoll commented on Dec 24, 2025

    @snicoll
    Member

    @libedi do not duplicate, especially without indicating you've done so. This was reported against Eclipse already.

    I am going to close this as duplicate but it looks like there are more investigations needed for this property, #48616

  10. added
    status: duplicate
    and removed
    status: waiting-for-feedback
    status: waiting-for-triage
    on Dec 24, 2025
  11. libedi commented on Dec 24, 2025

    @libedi
    Author

    @snicoll

    Sorry for the duplicate issue.
    I wasn’t sure whether this should be handled by Spring Boot or Spring Tools, so I reported it in both places.

    There was some confusion because the configuration metadata suggests
    default-version, while the actual runtime property binding only works with
    default.

    If this issue is better tracked elsewhere, please feel free to close it.

  12. snicoll commented on Dec 25, 2025

    @snicoll
    Member

    It is already closed and, again, we do not generate metadata for the property.

    Please don't report the same problem in two different places again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: duplicate

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions