diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/elasticsearch/jest/JestAutoConfiguration.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/elasticsearch/jest/JestAutoConfiguration.java index 4df795bf80..870b104409 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/elasticsearch/jest/JestAutoConfiguration.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/elasticsearch/jest/JestAutoConfiguration.java @@ -56,7 +56,7 @@ public class JestAutoConfiguration { this.gsonProvider = gsonProvider; } - @Bean + @Bean(destroyMethod = "shutdownClient") @ConditionalOnMissingBean public JestClient jestClient() { JestClientFactory factory = new JestClientFactory();