Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
spring-cloud-netflix
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-cloud-netflix
Commits
4ace667c
Commit
4ace667c
authored
Mar 14, 2018
by
Ryan Baxter
Committed by
Spencer Gibb
Mar 14, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sets default actuator prefix in Boot 2.0. Fixes #2777 (#2781)
parent
894a462e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
10 deletions
+15
-10
EurekaInstanceConfigBean.java
...mework/cloud/netflix/eureka/EurekaInstanceConfigBean.java
+7
-2
EurekaClientAutoConfigurationTests.java
...ud/netflix/eureka/EurekaClientAutoConfigurationTests.java
+8
-8
No files found.
spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/EurekaInstanceConfigBean.java
View file @
4ace667c
...
...
@@ -48,6 +48,11 @@ public class EurekaInstanceConfigBean implements CloudEurekaInstanceConfig, Envi
private
InetUtils
inetUtils
;
/**
* Default prefix for actuator endpoints
*/
private
String
actuatorPrefix
=
"/actuator"
;
/**
* Get the name of the application to be registered with eureka.
*/
private
String
appname
=
UNKNOWN
;
...
...
@@ -169,7 +174,7 @@ public class EurekaInstanceConfigBean implements CloudEurekaInstanceConfig, Envi
* status of this instance. Users can provide a simple HTML indicating what is the
* current status of the instance.
*/
private
String
statusPageUrlPath
=
"/info"
;
private
String
statusPageUrlPath
=
actuatorPrefix
+
"/info"
;
/**
* Gets the absolute status page URL path for this instance. The users can provide the
...
...
@@ -213,7 +218,7 @@ public class EurekaInstanceConfigBean implements CloudEurekaInstanceConfig, Envi
* instance - for example, it can be used to determine whether to proceed deployments
* to an entire farm or stop the deployments without causing further damage.
*/
private
String
healthCheckUrlPath
=
"/health"
;
private
String
healthCheckUrlPath
=
actuatorPrefix
+
"/health"
;
/**
* Gets the absolute health check page URL for this instance. The users can provide
...
...
spring-cloud-netflix-eureka-client/src/test/java/org/springframework/cloud/netflix/eureka/EurekaClientAutoConfigurationTests.java
View file @
4ace667c
...
...
@@ -209,9 +209,9 @@ public class EurekaClientAutoConfigurationTests {
EurekaInstanceConfigBean
instance
=
this
.
context
.
getBean
(
EurekaInstanceConfigBean
.
class
);
assertTrue
(
"Wrong status page: "
+
instance
.
getStatusPageUrl
(),
instance
.
getStatusPageUrl
().
endsWith
(
":9999/info"
));
instance
.
getStatusPageUrl
().
endsWith
(
":9999/
actuator/
info"
));
assertTrue
(
"Wrong health check: "
+
instance
.
getHealthCheckUrl
(),
instance
.
getHealthCheckUrl
().
endsWith
(
":9999/health"
));
instance
.
getHealthCheckUrl
().
endsWith
(
":9999/
actuator/
health"
));
}
@Test
...
...
@@ -223,9 +223,9 @@ public class EurekaClientAutoConfigurationTests {
EurekaInstanceConfigBean
instance
=
this
.
context
.
getBean
(
EurekaInstanceConfigBean
.
class
);
assertTrue
(
"Wrong status page: "
+
instance
.
getStatusPageUrl
(),
instance
.
getStatusPageUrl
().
endsWith
(
":8989/management/info"
));
instance
.
getStatusPageUrl
().
endsWith
(
":8989/management/
actuator/
info"
));
assertTrue
(
"Wrong health check: "
+
instance
.
getHealthCheckUrl
(),
instance
.
getHealthCheckUrl
().
endsWith
(
":8989/management/health"
));
instance
.
getHealthCheckUrl
().
endsWith
(
":8989/management/
actuator/
health"
));
}
@Test
...
...
@@ -298,9 +298,9 @@ public class EurekaClientAutoConfigurationTests {
EurekaInstanceConfigBean
instance
=
this
.
context
.
getBean
(
EurekaInstanceConfigBean
.
class
);
assertEquals
(
"statusPageUrl is wrong"
,
"http://"
+
instance
.
getIpAddress
()
+
":9999/info"
,
assertEquals
(
"statusPageUrl is wrong"
,
"http://"
+
instance
.
getIpAddress
()
+
":9999/
actuator/
info"
,
instance
.
getStatusPageUrl
());
assertEquals
(
"healthCheckUrl is wrong"
,
"http://"
+
instance
.
getIpAddress
()
+
":9999/health"
,
assertEquals
(
"healthCheckUrl is wrong"
,
"http://"
+
instance
.
getIpAddress
()
+
":9999/
actuator/
health"
,
instance
.
getHealthCheckUrl
());
}
...
...
@@ -315,9 +315,9 @@ public class EurekaClientAutoConfigurationTests {
EurekaInstanceConfigBean
instance
=
this
.
context
.
getBean
(
EurekaInstanceConfigBean
.
class
);
assertEquals
(
"statusPageUrl is wrong"
,
"http://192.168.13.90:9999/info"
,
assertEquals
(
"statusPageUrl is wrong"
,
"http://192.168.13.90:9999/
actuator/
info"
,
instance
.
getStatusPageUrl
());
assertEquals
(
"healthCheckUrl is wrong"
,
"http://192.168.13.90:9999/health"
,
assertEquals
(
"healthCheckUrl is wrong"
,
"http://192.168.13.90:9999/
actuator/
health"
,
instance
.
getHealthCheckUrl
());
}
...
...
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