Skip to content

Add MessageSourceProperties #9666

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ptahchiev opened this issue Jul 2, 2017 · 2 comments
Closed

Add MessageSourceProperties #9666

ptahchiev opened this issue Jul 2, 2017 · 2 comments
Assignees
Labels
type: enhancement A general enhancement
Milestone

Comments

@ptahchiev
Copy link
Contributor

As discussed on the gitter channel, if a user wants to create their own MessageSource bean, and use the properties from application.properties, he/she will not be able to inject those properties as an object, because those properties are fields on the MessageSourceAutoConfiguration class.

It would be nice to have a MessageSourceProperties object that holds the application properties of the MessageSource. However, as @dsyer explained, the the ApplicationContext is a MessageSource so that code gets executed super early and it was probably a defensive move to prevent too many things being initialized too early. It is well worth investigating how to overcome this issue.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jul 2, 2017
@philwebb
Copy link
Member

philwebb commented Jul 5, 2017

I missed the gitter conversation and I can't seem to find it now. I'm not totally following the description above, can you expand a little?

@philwebb philwebb added the status: waiting-for-feedback We need additional information before we can continue label Jul 5, 2017
@wilkinsona
Copy link
Member

We're binding directly to an auto-configuration class rather than to a dedicated configuration properties class. That's unusual and it'd be nice to remove the inconsistency. However, @dsyer wondered if the application context being a message source may make doing so a bit difficult.

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

No branches or pull requests

5 participants