Skip to content

Instantly share code, notes, and snippets.

View starjasmine's full-sized avatar
😀
Good

hiok starjasmine

😀
Good
View GitHub Profile
@starjasmine
starjasmine / ElasticsearchConfig.java
Created January 24, 2022 09:25
My working ElasticsearchConfig.java
package com.example.myproject.configs;
import org.elasticsearch.client.RestHighLevelClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.elasticsearch.client.ClientConfiguration;
import org.springframework.data.elasticsearch.client.RestClients;
import org.springframework.data.elasticsearch.config.AbstractElasticsearchConfiguration;
import org.springframework.data.elasticsearch.repository.config.EnableElasticsearchRepositories;