Skip to content

Sample spring boot project for connecting elastic search latest version (8.15.3)

Notifications You must be signed in to change notification settings

GaneshkumarKarunanidhi/SpringBootConfigForElasticSearch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project Details

Hello All,
      This project provides a simple setup for connecting to Elasticsearch 8 via Spring Boot. The approach involves overriding the default Spring autoconfiguration to create a custom Elasticsearch connection.

The core functionality of the project is to establish a connection to Elasticsearch and retrieve its version. This serves as a basic template for connecting to Elasticsearch, which you can expand and customize based on your needs.

Configuration

Before starting, you need to define the following properties in your application.properties

spring.elasticsearch.uris=elastic_search_uri
spring.elasticsearch.username=your_userName
spring.elasticsearch.password=your_password

In the spring.elasticsearch.uris property, specify the IP address of your Elasticsearch instance (e.g., 110...*). If you're running Elasticsearch locally, use localhost.

Note : The default Elasticsearch port is 9200, so you don't need to specify it explicitly. Spring Boot will automatically connect to http://<your_elasticsearch_uri>:9200 unless a different port is provided.

Once you've added the properties, the application will automatically establish a connection to your Elasticsearch instance.

Sample screen shot

Screenshot 2024-11-29 084348

Happy Coding 🪐 ✨

About

Sample spring boot project for connecting elastic search latest version (8.15.3)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages