Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 8836ecc

Browse files
Update DynamicJdbcDataSource.java
1 parent 581e9ba commit 8836ecc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎APIJSONDemo-MultiDataSource-Elasticsearch/src/main/java/apijson/demo/DynamicJdbcDataSource.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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];

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /