Skip to content

BeanTypeRegistry getConfigurationClassFactoryBeanGeneric only considers @Bean methods that take no arguments #3657

@wilkinsona

Description

@wilkinsona

For example, this @Bean method won't be found:

@Bean
public EmbeddedSolrServerFactoryBean solrServer(
        @Value("solr.solr.home") String solrHome) throws Exception {
    EmbeddedSolrServerFactoryBean factory = new EmbeddedSolrServerFactoryBean();
    return factory;
}

This means that the type of the solrServer bean is unknown and SolrAutoConfiguration ends up overriding it as the evaluation of @ConditionalOnMissingBean doesn't find the existing bean.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions