尝试使用spring-boot-starter-parent 1.4.0.RELEASE的spring-data Ingalls-M1发行版。
应用程序启动无法使用root异常实例化org.elasticsearch.client.Client
java.lang.NoSuchMethodError: org.elasticsearch.common.settings.Settings.settingsBuilder()
ElasticSearchConfiguration类如下所示。
@Configuration
public class ElasticSearchConfiguration {
@Bean
public ElasticsearchTemplate elasticsearchTemplate(Client client, Jackson2ObjectMapperBuilder jackson2ObjectMapperBuilder) {
return new ElasticsearchTemplate(client, new CustomEntityMapper(jackson2ObjectMapperBuilder.createXmlMapper(false).build()));
}
...
}
我可以手动配置客户端实例吗?怎么样?
答案 0 :(得分:1)
org.elasticsearch.common.settings.Settings.settingsBuilder()已被弃用,转而使用org.elasticsearch.common.settings.Settings.builder():
https://github.com/elastic/elasticsearch/commit/42526ac28e07da0055faafca1de6f8c5ec96cd85