Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
map-parent
Overview
Overview
Details
Activity
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
常超
map-parent
Commits
cdbf5890
Commit
cdbf5890
authored
Mar 21, 2024
by
yangyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
es地址切换提交(湖南)
parent
52bec921
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
service/publicapi/src/main/java/com/founder/publicapi/config/ElasticSearchClientConfig.java
+2
-2
No files found.
service/publicapi/src/main/java/com/founder/publicapi/config/ElasticSearchClientConfig.java
View file @
cdbf5890
...
...
@@ -27,10 +27,10 @@ public class ElasticSearchClientConfig {
RestHighLevelClient
client
=
null
;
//需要用户名和密码的认证
final
CredentialsProvider
credentialsProvider
=
new
BasicCredentialsProvider
();
credentialsProvider
.
setCredentials
(
AuthScope
.
ANY
,
new
UsernamePasswordCredentials
(
"elastic"
,
"admin
@
43"
));
credentialsProvider
.
setCredentials
(
AuthScope
.
ANY
,
new
UsernamePasswordCredentials
(
"elastic"
,
"admin
#
43"
));
RestClientBuilder
restClientBuilder
=
RestClient
.
builder
(
//new HttpHost("47.92.225.109",9200,"http"))
new
HttpHost
(
"10.142.16.1
91"
,
9209
,
"http"
))
new
HttpHost
(
"10.142.16.1
18"
,
9205
,
"http"
))
//new HttpHost(node2,port,"http"),
//new HttpHost(node3,port,"http"))
.
setHttpClientConfigCallback
(
new
RestClientBuilder
.
HttpClientConfigCallback
()
{
...
...
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