Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
spring-boot-admin
Project
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
openSource
spring-boot-admin
Commits
3dd252d9
Commit
3dd252d9
authored
Aug 08, 2017
by
Anders Båtstrand
Committed by
Johannes Edmeier
Aug 24, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make client connection timouts configurable.
fixes #515.
parent
fd596efb
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
1 deletion
+37
-1
client.adoc
spring-boot-admin-docs/src/main/asciidoc/client.adoc
+8
-0
AdminProperties.java
...codecentric/boot/admin/client/config/AdminProperties.java
+26
-0
SpringBootAdminClientAutoConfiguration.java
...client/config/SpringBootAdminClientAutoConfiguration.java
+3
-1
No files found.
spring-boot-admin-docs/src/main/asciidoc/client.adoc
View file @
3dd252d9
...
...
@@ -85,6 +85,14 @@ spring.boot.admin.password
| Interval for repeating the registration (in ms).
| `10.000`
| spring.boot.admin.connectTimeout
| Connect timeout for the registration (in ms).
| `5.000`
| spring.boot.admin.readTimeout
| Read timeout for the registration (in ms).
| `5.000`
| spring.boot.admin.auto-registration
| If set to true the periodic task to register the application is automatically scheduled after the application is ready.
| `true`
...
...
spring-boot-admin-starter-client/src/main/java/de/codecentric/boot/admin/client/config/AdminProperties.java
View file @
3dd252d9
...
...
@@ -36,6 +36,16 @@ public class AdminProperties {
private
long
period
=
10_000L
;
/**
* Connect timeout (in ms) for the registration.
*/
private
int
connectTimeout
=
5_000
;
/**
* Read timeout (in ms) for the registration.
*/
private
int
readTimeout
=
5_000
;
/**
* Username for basic authentication on admin server
*/
private
String
username
;
...
...
@@ -92,6 +102,22 @@ public class AdminProperties {
this
.
period
=
period
;
}
public
int
getConnectTimeout
()
{
return
connectTimeout
;
}
public
void
setConnectTimeout
(
int
connectTimeout
)
{
this
.
connectTimeout
=
connectTimeout
;
}
public
int
getReadTimeout
()
{
return
readTimeout
;
}
public
void
setReadTimeout
(
int
readTimeout
)
{
this
.
readTimeout
=
readTimeout
;
}
public
void
setUsername
(
String
username
)
{
this
.
username
=
username
;
}
...
...
spring-boot-admin-starter-client/src/main/java/de/codecentric/boot/admin/client/config/SpringBootAdminClientAutoConfiguration.java
View file @
3dd252d9
...
...
@@ -47,7 +47,9 @@ public class SpringBootAdminClientAutoConfiguration {
ApplicationFactory
applicationFactory
,
RestTemplateBuilder
restTemplBuilder
)
{
RestTemplateBuilder
builder
=
restTemplBuilder
.
messageConverters
(
new
MappingJackson2HttpMessageConverter
())
.
requestFactory
(
SimpleClientHttpRequestFactory
.
class
);
.
requestFactory
(
SimpleClientHttpRequestFactory
.
class
)
.
setConnectTimeout
(
admin
.
getConnectTimeout
())
.
setReadTimeout
(
admin
.
getReadTimeout
());
if
(
admin
.
getUsername
()
!=
null
)
{
builder
=
builder
.
basicAuthorization
(
admin
.
getUsername
(),
admin
.
getPassword
());
}
...
...
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