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
63a7ed76
Commit
63a7ed76
authored
Jan 16, 2026
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
style(cm): es初始请求
1.注释修改
parent
2959bad5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
ElasticSearchClientConfig.java
...t/module/common/api/config/ElasticSearchClientConfig.java
+4
-6
No files found.
amos-boot-system-tzs/amos-boot-module-common/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/config/ElasticSearchClientConfig.java
View file @
63a7ed76
...
...
@@ -31,8 +31,7 @@ public class ElasticSearchClientConfig {
@Bean
(
destroyMethod
=
"close"
)
public
RestHighLevelClient
restHighLevelClient
()
{
final
CredentialsProvider
credentialsProvider
=
new
BasicCredentialsProvider
();
credentialsProvider
.
setCredentials
(
AuthScope
.
ANY
,
new
UsernamePasswordCredentials
(
username
,
password
));
credentialsProvider
.
setCredentials
(
AuthScope
.
ANY
,
new
UsernamePasswordCredentials
(
username
,
password
));
try
{
HttpHost
[]
httpHosts
=
Arrays
.
stream
(
uris
.
split
(
","
)).
map
(
HttpHost:
:
create
).
toArray
(
HttpHost
[]::
new
);
...
...
@@ -50,10 +49,9 @@ public class ElasticSearchClientConfig {
});
// 请求级参数配置
builder
.
setRequestConfigCallback
(
requestConfigBuilder
->
{
// 连接超时(默认为1秒)
return
requestConfigBuilder
.
setConnectTimeout
(
5000
*
1000
)
// 套接字超时(默认为30秒)//更改客户端的超时限制默认30秒现在改为100*1000分钟
.
setSocketTimeout
(
6000
*
1000
);
return
requestConfigBuilder
.
setConnectTimeout
(
5000
*
1000
)
// 连接超时毫秒
.
setSocketTimeout
(
6000
*
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