File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
APIJSONDemo-MultiDataSource-Elasticsearch/src/main/java/apijson/demo Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ public void run(ApplicationArguments args) throws Exception {
97
97
public void initElasticDataSource () throws Exception {
98
98
String datasourceName = "elasticSearch" ;
99
99
String urlPrefix = "jdbc:elasticsearch://" ;
100
- String httpAddress = "47.108.49.213 :9201,47.108.49.213:9202,47.108.49.213 :9203" ;
100
+ String httpAddress = "127.0.0.1 :9201,192.168.0.1:9203,192.168.0.101 :9203" ;
101
101
String [] httpAddressArr = httpAddress .split ("," );
102
102
HttpHost [] httpHosts = new HttpHost [httpAddressArr .length ];
103
103
for (int i = 0 ; i < httpAddressArr .length ; i ++) {
@@ -107,7 +107,7 @@ public void initElasticDataSource() throws Exception {
107
107
httpHosts [i ] = httpHost ;
108
108
}
109
109
110
- String tcpAddress = "47.108.49.213:9301,47.108.49.213:9302,47.108.49.213:9303 " ;
110
+ String tcpAddress = "127.0.0.1:9201,192.168.0.1:9203,192.168.0.101:9203 " ;
111
111
String url = urlPrefix + tcpAddress ;
112
112
String [] tcpAddressArr = tcpAddress .split ("," );
113
113
TransportAddress [] transportAddresss = new TransportAddress [tcpAddressArr .length ];
You can’t perform that action at this time.
0 commit comments