美文网首页
SpringBoot+ Elasticsearch

SpringBoot+ Elasticsearch

作者: 放肆的桃子 | 来源:发表于2021-05-17 13:52 被阅读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

相关文章

网友评论

      本文标题:SpringBoot+ Elasticsearch

      本文链接:https://www.haomeiwen.com/subject/btlumctx.html