Skip to content

Commit 34a3299

Browse files
author
Phillip Webb
committed
Be defensive about solr classes required
Update SolrAutoConfiguration to specifically require HttpSolrServer and CloudSolrServer classes rather than the generic SolrServer. This prevents the rather cryptic "@ConditionalOnMissingBean annotations must specify at least one bean" error that can occur if an earlier version of solr happens to be on the classpath (as is the case when hibernate-search is used). Fixes gh-1098
1 parent a2efe17 commit 34a3299

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/solr/SolrAutoConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
* @since 1.1.0
3838
*/
3939
@Configuration
40-
@ConditionalOnClass(SolrServer.class)
40+
@ConditionalOnClass({ HttpSolrServer.class, CloudSolrServer.class })
4141
@EnableConfigurationProperties(SolrProperties.class)
4242
public class SolrAutoConfiguration {
4343

0 commit comments

Comments
 (0)