1.spring 中注入 bean 类,发现 HttpSolrClent 的构造方法全部无效了,通过内部类的 Build 类的来构建的,new HttpSolrClient.Builder("").build();
如何转换成对应的形式
<bean id="httpSolrClient" class="org.apache.solr.client.solrj.impl.HttpSolrClient">
<constructor-arg name="baseURL"
value="http://192.168.x.xxx:xxx/solr/core1" />
</bean>
The Builder pattern and the Spring framework
Spring XML-Based DI and Builder Pattern