Skip to content

Make it easier to map MessageSourceProperties onto a user-provided AbstractResourceBasedMessageSource - #51484

Open
henriquejsza wants to merge 1 commit into
spring-projects:mainfrom
henriquejsza:gh-20791-message-source-configurer
Open

Make it easier to map MessageSourceProperties onto a user-provided AbstractResourceBasedMessageSource#51484
henriquejsza wants to merge 1 commit into
spring-projects:mainfrom
henriquejsza:gh-20791-message-source-configurer

Conversation

@henriquejsza

Copy link
Copy Markdown
Contributor

This adds a ResourceBasedMessageSourceConfigurer bean that applies MessageSourceProperties to any AbstractResourceBasedMessageSource. The auto-configured ResourceBundleMessageSource now uses the configurer, while the configurer remains available when no resource bundle is found or when an application defines its own message source.

The conditions continue to use current-context lookup so parent/child context behavior is preserved. Tests cover configurer availability, configuring a user-defined ReloadableResourceBundleMessageSource, and using a user-provided configurer.

Closes #20791

Signed-off-by: henriquejsza <henriquejsza@gmail.com>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Aug 27, 2026
@wilkinsona wilkinsona changed the title Add ResourceBasedMessageSourceConfigurer Make it easier to map MessageSourceProperties onto a user-provided AbstractResourceBasedMessageSource Aug 28, 2026
@wilkinsona wilkinsona added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Aug 28, 2026
@wilkinsona wilkinsona added this to the 4.2.x milestone Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: enhancement A general enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make it easier to map MessageSourceProperties onto a user-provided AbstractResourceBasedMessageSource

3 participants