File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
main/java/org/springframework/data/elasticsearch/client Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -89,8 +89,8 @@ protected void buildClient() throws Exception {
89
89
client = TransportClient .builder ().settings (settings ()).build ();
90
90
Assert .hasText (clusterNodes , "[Assertion failed] clusterNodes settings missing." );
91
91
for (String clusterNode : split (clusterNodes , COMMA )) {
92
- String hostName = substringBefore (clusterNode , COLON );
93
- String port = substringAfter (clusterNode , COLON );
92
+ String hostName = substringBeforeLast (clusterNode , COLON );
93
+ String port = substringAfterLast (clusterNode , COLON );
94
94
Assert .hasText (hostName , "[Assertion failed] missing host name in 'clusterNodes'" );
95
95
Assert .hasText (port , "[Assertion failed] missing port in 'clusterNodes'" );
96
96
logger .info ("adding transport node : " + clusterNode );
Original file line number Diff line number Diff line change 9
9
http-enabled =" false" path-data =" target/elasticsearchTestData" path-home =" src/test/resources/test-home-dir"
10
10
path-configuration =" node-client-configuration.yml" />
11
11
12
+ <!-- ip4 -->
12
13
<!-- <elasticsearch:transport-client id="client" cluster-name="elasticsearch" cluster-nodes="127.0.0.1:9300" />-->
13
14
15
+ <!-- ip6 -->
16
+ <!-- <elasticsearch:transport-client id="client" cluster-name="elasticsearch" cluster-nodes="[::1]:9300" />-->
17
+
14
18
</beans >
You can’t perform that action at this time.
0 commit comments