SpringBoot+ Elasticsearch

2021-05-17  本文已影响0人  放肆的桃子
在开始前,先了解关于elasticsearch最基本的概念
1.Elasticsearch 是一个开源的分布式 RESTful 搜索和分析引擎
多节点使用统一的集群名
2.elasticsearch类比传统关系型数据库
Relational DB -> Databases -> Tables -> Rows -> Columns
Elasticsearch -> Indices   -> Types  -> Documents -> Fields
3.elasticsearch中
第一种

pom.xml

<dependency>
       <groupId>org.springframework.boot</groupId>
       <artifactId>spring-boot-starter-data-elasticsearch</artifactId>
</dependency>

application.xml

spring:
  data:
    elasticsearch:
          cluster-nodes: 172.31.148.162:9300
          cluster-name: elasticsearch
上一篇 下一篇

猜你喜欢

热点阅读