Skip to content

IDE configuration metadata does not respect @Name annotation for property binding #1751

@libedi

Description

@libedi

Summary

When using Spring Boot configuration properties that rely on the @Name annotation, the IDE (STS) appears to generate or interpret configuration metadata based solely on naming conventions, ignoring the explicit name defined by @Name.

This leads to incorrect property suggestions and misleading configuration guidance in the IDE.


Environment

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

Problem Description

In Spring Boot 4.0.1, the following configuration properties class exists:

org.springframework.boot.http.client.autoconfigure.ApiversionProperties

The relevant field is defined as:

@Name("default")
private String defaultVersion;

At runtime, the correct property name that binds successfully is:

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

However, the IDE configuration metadata / auto-completion suggests:

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

This suggests that the IDE is deriving the property name from the field name (defaultVersion) instead of honoring the explicit @Name("default") annotation.

Actual Behavior

  • IDE auto-completion and metadata suggest default-version
  • Using default-version has no effect at runtime
  • No warning or error is shown in the IDE

Expected Behavior

The IDE should:

  • Respect the @Name annotation when generating or interpreting configuration metadata
  • Suggest the effective property name:
    spring.http.serviceclient.{group}.apiversion.default
  • Avoid suggesting properties that do not bind at runtime

Impact

  • Developers are guided to configure incorrect properties
  • Results in silent misconfiguration without IDE feedback
  • Requires source-level inspection to identify the issue

Notes

This issue may be related to how the IDE processes Spring Boot configuration metadata and custom property naming annotations such as @Name.

Improving support for @Name would significantly reduce confusion and misconfiguration in IDE-assisted Spring Boot development.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions