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
97898e05
Commit
97898e05
authored
Nov 06, 2014
by
Dennis Schulte
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #15 from joshiste/mgmt-ctx-path
Register application with correct spring-boot management path
parents
d10b5bf3
56cb7948
Hide 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 @
97898e05
...
@@ -69,13 +69,16 @@ public class SpringBootAdminRegistratorTask implements Runnable {
...
@@ -69,13 +69,16 @@ public class SpringBootAdminRegistratorTask implements Runnable {
}
}
}
}
// register the application with the used URL and port
// 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
();
Application
app
=
new
Application
();
app
.
setId
(
id
);
app
.
setId
(
id
);
app
.
setUrl
(
url
);
app
.
setUrl
(
url
);
template
.
postForObject
(
adminUrl
+
"/api/applications"
,
app
,
String
.
class
);
template
.
postForObject
(
adminUrl
+
"/api/applications"
,
app
,
String
.
class
);
LOGGER
.
info
(
"Application registered itself at the admin application with ID '{}' and URL '{}'"
,
id
,
url
);
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
());
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