Your application.yml is enough. You don't need to create a configuration class, if your goal is simply use the default configurations for the ElasticsearchRestClient. Spring boot will identify that spring-data-elasticsearch is on the classpath and trigger the auto-configuration using the properties on your application.yml.
In fact, you should not extend ElasticsearchRestClientAutoConfiguration. This is just a auto-configuration class triggered by Spring Boot in order to configure your Elasticsearch Client.
If you need to programmatically supply any configuration for your client through Java, instead of your configuration file, then you can manually configure a client by extending AbstractElasticsearchConfiguration to configure yourself a RestHighLevelClient
Resources that may help you:
Spring Data Elasticsearch Reference Documentation
AbstractElasticsearchConfiguration javadoc