-
Notifications
You must be signed in to change notification settings - Fork 40.8k
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
MessageSourceAutoConfiguration relies on internal method call for BeanFactory.getBean() #13824
Comments
FWIW: this works for me: @Bean
public MessageSource messageSource(MessageSourceProperties properties) {
ResourceBundleMessageSource messageSource = new ResourceBundleMessageSource(); c.f. (from master): @Bean
public MessageSource messageSource() {
MessageSourceProperties properties = messageSourceProperties();
ResourceBundleMessageSource messageSource = new ResourceBundleMessageSource(); |
Yup, that's clearly not necessary. |
Or not ... #9666 (comment) |
That comment appears to be wrong or out of date. Need to test with a custom |
Yep, I've reached the same conclusion. |
That being said, I don't think this was added by accident anymore. This auto-configuration has the following:
Assuming a hierarchy of Not entirely sure what to do here. |
That will work as the bean in the child will take precedence. |
There might be other places. This is the only one I found so far. I assume there's a weird ordering issue that made it the way it is, but it would be nice to refactor it so that CGLib isn't strictly needed to create the beans in this class.
See also #9068
The text was updated successfully, but these errors were encountered: