导航栏

springboot整合ES-Rest-Client出现问题Timeout connecting to [localhost/127.0.0.1:9200]

原因

未知(小白初学)

分析

应该是springboot对es自动配置程序的自动配置为localhost:9200

解决

在application.properties配置如下
spring.elasticsearch.rest.uris=1.15.138.161:9200

插入数据到es中成功

(https://www.jianshu.com/p/7defb688c6c4)

posted @ 2021-03-03 18:23  RickZ  阅读(3353)  评论(0编辑  收藏  举报