Commit 34a32991 authored by Phillip Webb's avatar Phillip Webb

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
parent a2efe17f
...@@ -37,7 +37,7 @@ import org.springframework.util.StringUtils; ...@@ -37,7 +37,7 @@ import org.springframework.util.StringUtils;
* @since 1.1.0 * @since 1.1.0
*/ */
@Configuration @Configuration
@ConditionalOnClass(SolrServer.class) @ConditionalOnClass({ HttpSolrServer.class, CloudSolrServer.class })
@EnableConfigurationProperties(SolrProperties.class) @EnableConfigurationProperties(SolrProperties.class)
public class SolrAutoConfiguration { public class SolrAutoConfiguration {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment