2020
10-10
10-10
java连接ElasticSearch集群操作
我就废话不多说了,大家还是直接看代码吧~/**es配置类**/@ConfigurationpublicclassElasticSearchDataSourceConfigurer{privatestaticfinalLoggerLOG=LogManager.getLogger(ElasticSearchDataSourceConfigurer.class);@BeanpublicTransportClientgetESClient(){//设置集群名称Settingssettings=Settings.builder().put("cluster.name","bigData-cluster").put("client.transport.sniff",true)...
继续阅读 >