1: [SpringData集成Elasticsearch] --- 相关依赖

文章目录

  • 一:引入SpringDataElasticsearch依赖
  • 二:配置YML
  • 三:查看打印日志

一:引入SpringDataElasticsearch依赖

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

二:配置YML

核心命令日志打印

logging:
  level:
    org.springframework.data.elasticsearch.core: debug
    org.springframework.data.elasticsearch.client.WIRE: TRACE
spring:
  elasticsearch:
    rest:
      uris: 192.yourIp.103:9200
      username: elastic
      password: 123456
logging:
  level:
    org.springframework.data.elasticsearch.core: debug
    org.springframework.data.elasticsearch.client.WIRE: TRACE

1: [SpringData集成Elasticsearch] --- 相关依赖_第1张图片

三:查看打印日志

2023-01-10 23:22:37.629  INFO 23588 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data Elasticsearch repositories in DEFAULT mode.
2023-01-10 23:22:37.690  INFO 23588 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 56 ms. Found 1 Elasticsearch repository interfaces.
2023-01-10 23:22:37.693  INFO 23588 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data Reactive Elasticsearch repositories in DEFAULT mode.
2023-01-10 23:22:37.697  INFO 23588 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 3 ms. Found 0 Reactive Elasticsearch repository interfaces.

1: [SpringData集成Elasticsearch] --- 相关依赖_第2张图片

你可能感兴趣的:(Java-后端,#,elasticsearch,springboot,JAVA)