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
56cb7948
Commit
56cb7948
authored
Oct 29, 2014
by
Johannes Stelzer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
register application with correct spring-boot management path
parent
d10b5bf3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
SpringBootAdminRegistratorTask.java
...c/boot/admin/services/SpringBootAdminRegistratorTask.java
+5
-2
No files found.
spring-boot-starter-admin-client/src/main/java/de/codecentric/boot/admin/services/SpringBootAdminRegistratorTask.java
View file @
56cb7948
...
...
@@ -69,13 +69,16 @@ public class SpringBootAdminRegistratorTask implements Runnable {
}
}
// register the application with the used URL and port
String
url
=
new
URL
(
"http"
,
InetAddress
.
getLocalHost
().
getCanonicalHostName
(),
port
,
""
).
toString
();
String
managementPath
=
env
.
getProperty
(
"management.context-path"
,
""
);
String
url
=
new
URL
(
"http"
,
InetAddress
.
getLocalHost
().
getCanonicalHostName
(),
port
,
managementPath
)
.
toString
();
Application
app
=
new
Application
();
app
.
setId
(
id
);
app
.
setUrl
(
url
);
template
.
postForObject
(
adminUrl
+
"/api/applications"
,
app
,
String
.
class
);
LOGGER
.
info
(
"Application registered itself at the admin application with ID '{}' and URL '{}'"
,
id
,
url
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
LOGGER
.
warn
(
"Failed to register application at spring-boot-admin, message={}"
,
e
.
getMessage
());
}
}
...
...
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