Ensure local Elasticsearch nodes are closed
Update ElasticsearchAutoConfiguration to ensure that local nodes are closed when the context is closed. Prior to this commit the close() method of the Client would be called which had no effect for local Nodes. Fixes gh-2480
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2013 the original author or authors.
|
||||
* Copyright 2012-2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -62,6 +62,6 @@ public class SampleElasticsearchApplication implements CommandLineRunner {
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
SpringApplication.run(SampleElasticsearchApplication.class, "--debug");
|
||||
SpringApplication.run(SampleElasticsearchApplication.class, "--debug").close();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user