Skip to content

Conversation

mp911de
Copy link
Member

@mp911de mp911de commented Oct 2, 2025

Do not register a MappingContext through the extension, instead expose a MappingContext through KeyValueAdapter so implementations can bring their own mapping context. They can also decide where to obtain the mapping context from and whether to expose it as bean at all. This is useful for a minimal configuration and removes the need to detect whether there is already a mapping context available.

Detection of mapping context (or even converters) can go either into the adapter or somewhere else as detecting bean registrations depends on configuration ordering. Any later bean registrations might be not visible to our extension and so we had always the drawback of requiring any customizations being colocated within the config class that uses the Enable…Repositories annotation.

Do not merge yet, rather a target for 4.1.

TODO:

  • Introduce deprecations for removed API in prior
    • KeyValueTemplate
    • KeyValueRepositoryConfigurationExtension
  • Explore downstream changes in Redis

Do not register a MappingContext through the extension, instead expose a MappingContext through KeyValueAdapter so implementations can bring their own mapping context. They can also decide where to obtain the mapping context from and whether to expose it as bean at all. This is useful for a minimal configuration and removes the need to detect whether there is already a mapping context available.

Detection of mapping context (or even converters) can go either into the adapter or somewhere else as detecting bean registrations depends on configuration ordering. Any later bean registrations might be not visible to our extension and so we had always the drawback of requiring any customizations being colocated within the config class that uses the Enable…Repositories annotation.
@mp911de mp911de added for: team-attention An issue we need to discuss as a team to make progress type: enhancement A general enhancement labels Oct 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

for: team-attention An issue we need to discuss as a team to make progress type: enhancement A general enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Revisit configuration model of KeyValueRepositoryConfigurationExtension

2 participants