Merge branch '1.4.x' into 1.5.x
This commit is contained in:
commit
7ffa499949
|
@ -56,7 +56,7 @@ public class JestAutoConfiguration {
|
|||
this.gsonProvider = gsonProvider;
|
||||
}
|
||||
|
||||
@Bean
|
||||
@Bean(destroyMethod = "shutdownClient")
|
||||
@ConditionalOnMissingBean
|
||||
public JestClient jestClient() {
|
||||
JestClientFactory factory = new JestClientFactory();
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
package org.springframework.boot.autoconfigure.elasticsearch.jest;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -33,7 +34,8 @@ public class JestProperties {
|
|||
/**
|
||||
* Comma-separated list of the Elasticsearch instances to use.
|
||||
*/
|
||||
private List<String> uris = Collections.singletonList("http://localhost:9200");
|
||||
private List<String> uris = new ArrayList<String>(Collections.singletonList(
|
||||
"http://localhost:9200"));
|
||||
|
||||
/**
|
||||
* Login user.
|
||||
|
|
|
@ -108,6 +108,10 @@
|
|||
"description": "Enable Solr repositories.",
|
||||
"defaultValue": true
|
||||
},
|
||||
{
|
||||
"name": "spring.elasticsearch.jest.uris",
|
||||
"defaultValue": ["http://localhost:9200"]
|
||||
},
|
||||
{
|
||||
"name": "spring.http.encoding.enabled",
|
||||
"type": "java.lang.Boolean",
|
||||
|
|
|
@ -73,7 +73,7 @@ public class JestAutoConfigurationTests {
|
|||
@Test
|
||||
public void customJestClient() {
|
||||
load(CustomJestClient.class,
|
||||
"spring.elasticsearch.jest.uris=http://localhost:9200");
|
||||
"spring.elasticsearch.jest.uris[0]=http://localhost:9200");
|
||||
assertThat(this.context.getBeansOfType(JestClient.class)).hasSize(1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue