spring boot 2.0 整合 elasticsearch NoNodeAvailableException ...
原文地址:spring boot 2.0 整合 elasticsearch NoNodeAvailableException
原文說的有點問題,下麵貼出我的配置:
原碼雲項目地址:https://gitee.com/11230595/springboot-elasticsearch
elasticsearch.yml
cluster.name: my-application
network.host: 0.0.0.0
http.port: 9200
transport.tcp.port: 9300
transport.tcp.compress: true
application.properties
# elasticsearch.yml 文件中的 cluster.name spring.data.elasticsearch.cluster-name=my-application # elasticsearch 調用地址,多個使用“,”隔開 spring.data.elasticsearch.repositories.enabled=true spring.data.elasticsearch.cluster-nodes=localhost:9300 spring.data.elasticsearch.properties.path.logs=./elasticsearch/log spring.data.elasticsearch.properties.path.data=./elasticsearch/data