As a convenience, @Configuration
classses may extend
ConfigurationSupport
, primarily in order to facilitate
easy lookup of beans from the enclosing ApplicationContext
.
@Configuration public class AppConfig extends ConfigurationSupport { @Bean public Service serviceA() { // referencing a bean of type DataSource declared elsewhere DataSource dataSource = this.getBean(DataSource.class); return new ServiceImpl(dataSource); } }