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 {
9797 public void initElasticDataSource () throws Exception {
9898 String datasourceName = "elasticSearch" ;
9999 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" ;
101101 String [] httpAddressArr = httpAddress .split ("," );
102102 HttpHost [] httpHosts = new HttpHost [httpAddressArr .length ];
103103 for (int i = 0 ; i < httpAddressArr .length ; i ++) {
@@ -107,7 +107,7 @@ public void initElasticDataSource() throws Exception {
107107 httpHosts [i ] = httpHost ;
108108 }
109109
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 " ;
111111 String url = urlPrefix + tcpAddress ;
112112 String [] tcpAddressArr = tcpAddress .split ("," );
113113 TransportAddress [] transportAddresss = new TransportAddress [tcpAddressArr .length ];
You can’t perform that action at this time.
0 commit comments