springboot配置es集群两种方式
时间:2019-11-30 00:15:06
收藏:0
阅读:1343
方式1:
elasticsearch:
nodes: xxx.xxx.xxx.xxx:9200,xxx.xxx.xxx.xxx:9200,xxx.xxx.xxx.xxx:9200
schema: http
max-connect-total: 100
max-connect-per-route: 50
connection-request-timeout-millis: 3000
socket-timeout-millis: 30000
connect-timeout-millis: 3000
方式2:
data:
elasticsearch:
cluster-name: media
cluster-nodes: xxx.xxx.xxx.xxx:9300,xxx.xxx.xxx.xxx:9300,xxx.xxx.xxx.xxx:9300
es与java交互的默认端口号是9300,与http交互的端口号是9200; 方式2改成9200端口会在启动的时候提示连接失败。
原文:https://www.cnblogs.com/jylsgup/p/11960956.html
评论(0)