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
99369f27
Commit
99369f27
authored
Aug 10, 2016
by
Johannes Edmeier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix all RestTemplateBuilders
Fix the usage of RestTemplateBuilders which wasn't covered by PR #247
parent
46bd004e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
AdminServerWebConfiguration.java
...entric/boot/admin/config/AdminServerWebConfiguration.java
+3
-2
SpringBootAdminClientAutoConfiguration.java
.../admin/config/SpringBootAdminClientAutoConfiguration.java
+3
-2
No files found.
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/config/AdminServerWebConfiguration.java
View file @
99369f27
...
...
@@ -82,7 +82,7 @@ public class AdminServerWebConfiguration extends WebMvcConfigurerAdapter
private
ResourcePatternResolver
resourcePatternResolver
;
@Autowired
private
RestTemplateBuilder
b
uilder
;
private
RestTemplateBuilder
restTemplB
uilder
;
@Bean
@ConditionalOnMissingBean
...
...
@@ -181,7 +181,8 @@ public class AdminServerWebConfiguration extends WebMvcConfigurerAdapter
@Bean
@ConditionalOnMissingBean
public
StatusUpdater
statusUpdater
()
{
builder
.
messageConverters
(
new
MappingJackson2HttpMessageConverter
())
RestTemplateBuilder
builder
=
restTemplBuilder
.
messageConverters
(
new
MappingJackson2HttpMessageConverter
())
.
errorHandler
(
new
DefaultResponseErrorHandler
()
{
@Override
protected
boolean
hasError
(
HttpStatus
statusCode
)
{
...
...
spring-boot-admin-starter-client/src/main/java/de/codecentric/boot/admin/config/SpringBootAdminClientAutoConfiguration.java
View file @
99369f27
...
...
@@ -39,7 +39,7 @@ public class SpringBootAdminClientAutoConfiguration {
private
AdminProperties
admin
;
@Autowired
private
RestTemplateBuilder
b
uilder
;
private
RestTemplateBuilder
restTemplB
uilder
;
/**
* Task that registers the application at the spring-boot-admin application.
...
...
@@ -47,7 +47,8 @@ public class SpringBootAdminClientAutoConfiguration {
@Bean
@ConditionalOnMissingBean
public
ApplicationRegistrator
registrator
()
{
builder
=
builder
.
messageConverters
(
new
MappingJackson2HttpMessageConverter
());
RestTemplateBuilder
builder
=
restTemplBuilder
.
messageConverters
(
new
MappingJackson2HttpMessageConverter
());
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