Application.yml and jars required for SpringBoot 2.4 + with Elasticsearch 7.1 +

Build.Gradle

ext {
    springBootVersion = '2.5.0'
}

dependencies {
    implementation('org.springframework.boot:spring-boot-starter-web') {
      exclude module: "spring-boot-starter-tomcat"
    }

implementation ('org.springframework.data:spring-data-elasticsearch')

}

application.yml

elasticsearch:
  rest:
    uris: http://localhost:9200

or with username and password
elasticsearch:
  rest:
    uris: https://MyHost:9200
    username: arun
    password: mypassword