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
pull/1128/head
Phillip Webb 11 years ago
parent a2efe17fc9
commit 34a32991fa

@ -37,7 +37,7 @@ import org.springframework.util.StringUtils;
* @since 1.1.0
*/
@Configuration
@ConditionalOnClass(SolrServer.class)
@ConditionalOnClass({ HttpSolrServer.class, CloudSolrServer.class })
@EnableConfigurationProperties(SolrProperties.class)
public class SolrAutoConfiguration {

Loading…
Cancel
Save