Package edu.byu.hbll.solr.auto
Class SolrAutoConfiguration
java.lang.Object
edu.byu.hbll.solr.auto.SolrAutoConfiguration
@Configuration
@EnableConfigurationProperties(SolrProperties.class)
public class SolrAutoConfiguration
extends Object
Auto configuration for a
CloudSolrClient.- Author:
- Charles Draper
-
Constructor Summary
ConstructorsConstructorDescriptionSolrAutoConfiguration(SolrProperties properties) Creates a new configuration with the given properties. -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.solr.client.solrj.SolrClientclient()Creates theSolrClientbean.voidCloses theSolrClient.
-
Constructor Details
-
SolrAutoConfiguration
Creates a new configuration with the given properties.- Parameters:
properties- the properties
-
-
Method Details
-
client
@Bean @ConditionalOnMissingBean public org.apache.solr.client.solrj.SolrClient client() throws IOException, org.apache.solr.client.solrj.SolrServerExceptionCreates theSolrClientbean.- Returns:
- the solr client
- Throws:
org.apache.solr.client.solrj.SolrServerException- if a Solr error occursIOException- if an I/O error occurs
-
preDestroy
Closes theSolrClient.- Throws:
IOException- if an I/O error occurs
-