Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
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
DEMO
spring-boot
Commits
f0f999a2
Commit
f0f999a2
authored
Oct 15, 2018
by
Phillip Webb
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2.0.x'
parents
31b0fc23
5d219bcd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
7 deletions
+5
-7
MappingWebEndpointPathMapper.java
...oconfigure/endpoint/web/MappingWebEndpointPathMapper.java
+4
-1
CouchbaseHealthIndicator.java
...work/boot/actuate/couchbase/CouchbaseHealthIndicator.java
+1
-6
No files found.
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/MappingWebEndpointPathMapper.java
View file @
f0f999a2
...
@@ -21,6 +21,7 @@ import java.util.Map;
...
@@ -21,6 +21,7 @@ import java.util.Map;
import
org.springframework.boot.actuate.endpoint.EndpointId
;
import
org.springframework.boot.actuate.endpoint.EndpointId
;
import
org.springframework.boot.actuate.endpoint.web.PathMapper
;
import
org.springframework.boot.actuate.endpoint.web.PathMapper
;
import
org.springframework.util.StringUtils
;
/**
/**
* A {@link PathMapper} implementation that uses a simple {@link Map} to determine the
* A {@link PathMapper} implementation that uses a simple {@link Map} to determine the
...
@@ -40,7 +41,9 @@ class MappingWebEndpointPathMapper implements PathMapper {
...
@@ -40,7 +41,9 @@ class MappingWebEndpointPathMapper implements PathMapper {
@Override
@Override
public
String
getRootPath
(
EndpointId
endpointId
)
{
public
String
getRootPath
(
EndpointId
endpointId
)
{
return
this
.
pathMapping
.
getOrDefault
(
endpointId
,
endpointId
.
toString
());
String
path
=
this
.
pathMapping
.
get
(
endpointId
);
return
StringUtils
.
hasText
(
path
)
?
path
:
PathMapper
.
useEndpointId
().
getRootPath
(
endpointId
);
}
}
}
}
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/couchbase/CouchbaseHealthIndicator.java
View file @
f0f999a2
...
@@ -55,12 +55,7 @@ public class CouchbaseHealthIndicator extends AbstractHealthIndicator {
...
@@ -55,12 +55,7 @@ public class CouchbaseHealthIndicator extends AbstractHealthIndicator {
@Override
@Override
protected
void
doHealthCheck
(
Health
.
Builder
builder
)
throws
Exception
{
protected
void
doHealthCheck
(
Health
.
Builder
builder
)
throws
Exception
{
DiagnosticsReport
diagnostics
=
this
.
cluster
.
diagnostics
();
DiagnosticsReport
diagnostics
=
this
.
cluster
.
diagnostics
();
if
(
isCouchbaseUp
(
diagnostics
))
{
builder
=
isCouchbaseUp
(
diagnostics
)
?
builder
.
up
()
:
builder
.
down
();
builder
.
up
();
}
else
{
builder
.
down
();
}
builder
.
withDetail
(
"sdk"
,
diagnostics
.
sdk
());
builder
.
withDetail
(
"sdk"
,
diagnostics
.
sdk
());
builder
.
withDetail
(
"endpoints"
,
diagnostics
.
endpoints
().
stream
()
builder
.
withDetail
(
"endpoints"
,
diagnostics
.
endpoints
().
stream
()
.
map
(
this
::
describe
).
collect
(
Collectors
.
toList
()));
.
map
(
this
::
describe
).
collect
(
Collectors
.
toList
()));
...
...
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