当前位置:   article > 正文

springboot整合elasticsearch配置及增删改方法_spring-boot-autoconfigure里面的elasticsearch包怎么剔除

spring-boot-autoconfigure里面的elasticsearch包怎么剔除

1. 添加依赖

  1. <!-- springboot elasticsearch整合 -->
  2. <dependency>
  3. <groupId>org.springframework.boot</groupId>
  4. <artifactId>spring-boot-starter-data-elasticsearch</artifactId>
  5. </dependency>

2.application.yml 文件配置

  1. server:
  2. port: 8080
  3. spring:
  4. redis:
  5. database: 0
  6. host: 192.168.216.128
  7. port: 6379
  8. timeout: 5000
  9. password: 123456
  10. data:
  11. elasticsearch:
  12. cluster-name: elasticsearch-cluster #es集群名称
  13. cluster-nodes: 192.168.216.128:9300,192.168.216.128:9301,192.168.216.128:9302 #es集群所有节点的列表
  14. repositories:
  15. enabled: true
  16. datasource:
  17. type: com.alibaba.druid.pool.DruidDataSource
  18. characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true
  19. url: jdbc:mysql://localhost:3306/product?characterEncoding=utf-8
  20. username: root
  21. password: 111111
  22. druid
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家小花儿/article/detail/68767
推荐阅读
相关标签
  

闽ICP备14008679号