Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
b2a68d70
Commit
b2a68d70
authored
Mar 17, 2015
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '1.2.x'
parents
dd357186
89b4cac8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
0 deletions
+16
-0
ElasticsearchAutoConfiguration.java
...nfigure/elasticsearch/ElasticsearchAutoConfiguration.java
+1
-0
ElasticsearchProperties.java
.../autoconfigure/elasticsearch/ElasticsearchProperties.java
+14
-0
appendix-application-properties.adoc
...cs/src/main/asciidoc/appendix-application-properties.adoc
+1
-0
No files found.
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/elasticsearch/ElasticsearchAutoConfiguration.java
View file @
b2a68d70
...
...
@@ -87,6 +87,7 @@ public class ElasticsearchAutoConfiguration implements DisposableBean {
TransportClientFactoryBean
factory
=
new
TransportClientFactoryBean
();
factory
.
setClusterName
(
this
.
properties
.
getClusterName
());
factory
.
setClusterNodes
(
this
.
properties
.
getClusterNodes
());
factory
.
setClientTransportSniff
(
this
.
properties
.
getClientTransportSniff
());
factory
.
afterPropertiesSet
();
TransportClient
client
=
factory
.
getObject
();
this
.
releasable
=
client
;
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/elasticsearch/ElasticsearchProperties.java
View file @
b2a68d70
...
...
@@ -39,6 +39,11 @@ public class ElasticsearchProperties {
*/
private
String
clusterNodes
;
/**
* Allow the client to sniff for other members of the cluster.
*/
private
boolean
clientTransportSniff
=
true
;
public
String
getClusterName
()
{
return
this
.
clusterName
;
}
...
...
@@ -54,4 +59,13 @@ public class ElasticsearchProperties {
public
void
setClusterNodes
(
String
clusterNodes
)
{
this
.
clusterNodes
=
clusterNodes
;
}
public
boolean
getClientTransportSniff
()
{
return
this
.
clientTransportSniff
;
}
public
void
setClientTransportSniff
(
boolean
clientTransportSniff
)
{
this
.
clientTransportSniff
=
clientTransportSniff
;
}
}
spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc
View file @
b2a68d70
...
...
@@ -349,6 +349,7 @@ content into your application; rather pick only the properties that you need.
spring.data.solr.repositories.enabled=true # if spring data repository support is enabled
# ELASTICSEARCH ({sc-spring-boot-autoconfigure}/elasticsearch/ElasticsearchProperties.{sc-ext}[ElasticsearchProperties])
spring.data.elasticsearch.client-transport-sniff=true # Allow the client to sniff for other members of the cluster
spring.data.elasticsearch.cluster-name= # The cluster name (defaults to elasticsearch)
spring.data.elasticsearch.cluster-nodes= # The address(es) of the server node (comma-separated; if not specified starts a client node)
spring.data.elasticsearch.repositories.enabled=true # if spring data repository support is enabled
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment