Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
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
项目统一框架
amos-boot-biz
Commits
2483d150
Commit
2483d150
authored
Nov 27, 2025
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jyjc):参数优化
1.es优化
parent
db6249c9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
ElasticSearchClientConfig.java
...oot/module/jyjc/biz/config/ElasticSearchClientConfig.java
+4
-7
No files found.
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/config/ElasticSearchClientConfig.java
View file @
2483d150
...
...
@@ -34,16 +34,13 @@ public class ElasticSearchClientConfig {
try
{
HttpHost
[]
httpHosts
=
Arrays
.
stream
(
uris
.
split
(
","
)).
map
(
HttpHost:
:
create
).
toArray
(
HttpHost
[]::
new
);
RestClientBuilder
builder
=
RestClient
.
builder
(
httpHosts
);
builder
.
setHttpClientConfigCallback
(
httpClientBuilder
->
{
httpClientBuilder
.
disableAuthCaching
();
return
httpClientBuilder
.
setDefaultCredentialsProvider
(
credentialsProvider
);
});
builder
.
setHttpClientConfigCallback
(
httpClientBuilder
->
httpClientBuilder
.
setDefaultCredentialsProvider
(
credentialsProvider
));
// 该方法接收一个RequestConfig.Builder对象,对该对象进行修改后然后返回。
builder
.
setRequestConfigCallback
(
requestConfigBuilder
->
{
// 连接超时(默认为1秒)
return
requestConfigBuilder
.
setConnectTimeout
(
500
0
*
1000
)
// 套接字超时(默认为30秒)
//更改客户端的超时限制默认30秒现在改为100*1000分钟
.
setSocketTimeout
(
60
00
*
1000
);
return
requestConfigBuilder
.
setConnectTimeout
(
6
0
*
1000
)
// 套接字超时(默认为30秒)
.
setSocketTimeout
(
60
*
1000
);
});
return
new
RestHighLevelClient
(
builder
);
...
...
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