Remove SolrAutoConfiguration @PreDestroy
Remove @PreDestroy from SolrAutoConfiguration since the container will call the close method anyway. Fixes gh-5333 Closes gh-5339
This commit is contained in:
parent
f500d67eaa
commit
4d667970c4
|
|
@ -16,10 +16,6 @@
|
|||
|
||||
package org.springframework.boot.autoconfigure.solr;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.annotation.PreDestroy;
|
||||
|
||||
import org.apache.solr.client.solrj.SolrClient;
|
||||
import org.apache.solr.client.solrj.impl.CloudSolrClient;
|
||||
import org.apache.solr.client.solrj.impl.HttpSolrClient;
|
||||
|
|
@ -51,13 +47,6 @@ public class SolrAutoConfiguration {
|
|||
this.properties = properties;
|
||||
}
|
||||
|
||||
@PreDestroy
|
||||
public void close() throws IOException {
|
||||
if (this.solrClient != null) {
|
||||
this.solrClient.close();
|
||||
}
|
||||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean
|
||||
public SolrClient solrClient() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue