You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support of class ConfigurationSupport in Spring 3.0.x framework [SPR-6018] #10687
in: coreIssues in core modules (aop, beans, core, context, expression)status: declinedA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancement
Hi David - could you provide a few of your most important use cases for ConfigurationSupport, i.e.: what are you unable to do at this point? There is a forthcoming release of JavaConfig that will build upon the core support in Spring 3.0, and it's likely that ConfigurationSupport or its equivalent will initially show up here.
Of course, we can implement BeanFactoryAware and ApplicationContextAware and do this ourselves, but it was much more convenient to simply extend ConfigurationSupport.
As discussed previously, I don't think that we should be reintroducing ConfigurationSupport as we knew it. Revisiting what it did, most of it is first-class functionality in the BeanFactory in the meantime and can be used against a BeanFactory/ApplicationContext in a delegate fashion, with not much advantage from having such convenience methods in a base class. Note that you don't have to implement the *Aware interfaces anymore; you may also use a private @Autowired BeanFactory field...
If specific functionality is missing which you're nevertheless relying on in your concrete configuration classes even when refactoring them to delegate to BeanFactory / AutowireCapableBeanFactory / ApplicationContext, let us know. We'd consider adding it to BeanFactory or BeanFactoryUtils then.
in: coreIssues in core modules (aop, beans, core, context, expression)status: declinedA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancement
Activity
spring-projects-issues commentedon Aug 17, 2009
Chris Beams commented
Hi David - could you provide a few of your most important use cases for
ConfigurationSupport, i.e.: what are you unable to do at this point? There is a forthcoming release of JavaConfig that will build upon the core support in Spring 3.0, and it's likely thatConfigurationSupportor its equivalent will initially show up here.spring-projects-issues commentedon Aug 18, 2009
David Nemeshazy commented
Yes, of course.
We are using the following from
ConfigurationSupport:getApplicationContext()getBean(Class<T> type)getObject(FactoryBean factoryBean, Class<T> requiredType)Of course, we can implement
BeanFactoryAwareandApplicationContextAwareand do this ourselves, but it was much more convenient to simply extendConfigurationSupport.Thanks-
spring-projects-issues commentedon Jan 12, 2010
Juergen Hoeller commented
As discussed previously, I don't think that we should be reintroducing ConfigurationSupport as we knew it. Revisiting what it did, most of it is first-class functionality in the BeanFactory in the meantime and can be used against a BeanFactory/ApplicationContext in a delegate fashion, with not much advantage from having such convenience methods in a base class. Note that you don't have to implement the *Aware interfaces anymore; you may also use a private
@AutowiredBeanFactory field...If specific functionality is missing which you're nevertheless relying on in your concrete configuration classes even when refactoring them to delegate to BeanFactory / AutowireCapableBeanFactory / ApplicationContext, let us know. We'd consider adding it to BeanFactory or BeanFactoryUtils then.
Juergen
spring-projects-issues commentedon May 24, 2010
Baruch Sadogursky commented
The only feature I missed from the original ConfigurationSupport was getObject(FactoryBean), and I hated to extend from it. So here is injectable version of ConfigurationSupport with getObject method - http://github.com/jbaruch/spring-java-configuration-support
spring-projects-issues commentedon Aug 3, 2010
Chris Beams commented
See also #12076