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
ed00440a
Commit
ed00440a
authored
Jul 15, 2016
by
Johannes Edmeier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't use server.context path if management.port differs
fixes #230
parent
de6782ee
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
3 deletions
+17
-3
AdminClientProperties.java
.../codecentric/boot/admin/config/AdminClientProperties.java
+1
-3
AdminClientPropertiesTest.java
...ecentric/boot/admin/config/AdminClientPropertiesTest.java
+16
-0
No files found.
spring-boot-admin-starter-client/src/main/java/de/codecentric/boot/admin/config/AdminClientProperties.java
View file @
ed00440a
...
...
@@ -104,9 +104,7 @@ public class AdminClientProperties {
server
.
getContextPath
()),
management
.
getContextPath
());
}
return
append
(
append
(
createLocalUri
(
getHostAddress
().
getCanonicalHostName
(),
managementPort
),
server
.
getContextPath
()),
return
append
(
createLocalUri
(
getHostAddress
().
getCanonicalHostName
(),
managementPort
),
management
.
getContextPath
());
}
...
...
spring-boot-admin-starter-client/src/test/java/de/codecentric/boot/admin/config/AdminClientPropertiesTest.java
View file @
ed00440a
...
...
@@ -61,6 +61,22 @@ public class AdminClientPropertiesTest {
}
@Test
public
void
test_contextPatht_mgmtPortPath
()
{
load
(
"server.context-path=app"
,
"management.context-path=/admin"
,
"local.server.port=8080"
,
"local.management.port=8081"
);
AdminClientProperties
clientProperties
=
new
AdminClientProperties
();
context
.
getAutowireCapableBeanFactory
().
autowireBean
(
clientProperties
);
publishApplicationReadyEvent
(
clientProperties
);
assertThat
(
clientProperties
.
getManagementUrl
(),
is
(
"http://"
+
getHostname
()
+
":8081/admin"
));
assertThat
(
clientProperties
.
getHealthUrl
(),
is
(
"http://"
+
getHostname
()
+
":8081/admin/health"
));
assertThat
(
clientProperties
.
getServiceUrl
(),
is
(
"http://"
+
getHostname
()
+
":8080/app"
));
}
@Test
public
void
test_contextPath
()
{
load
(
"server.context-path=app"
,
"local.server.port=80"
);
AdminClientProperties
clientProperties
=
new
AdminClientProperties
();
...
...
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