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
09ac0fee
Commit
09ac0fee
authored
Mar 23, 2018
by
Johannes Edmeier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish
parent
ffbb33af
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
10 deletions
+11
-10
pom.xml
pom.xml
+1
-1
ProbeEndpointsStrategy.java
...min/server/services/endpoints/ProbeEndpointsStrategy.java
+10
-9
No files found.
pom.xml
View file @
09ac0fee
...
...
@@ -28,7 +28,7 @@
<properties>
<revision>
2.0.0-SNAPSHOT
</revision>
<spring-boot.version>
2.0.0.RELEASE
</spring-boot.version>
<spring-cloud.version>
Finchley.M
8
</spring-cloud.version>
<spring-cloud.version>
Finchley.M
9
</spring-cloud.version>
<hazelcast-tests.version>
3.9.2
</hazelcast-tests.version>
<java.version>
1.8
</java.version>
<maven.compiler.source>
${java.version}
</maven.compiler.source>
...
...
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/services/endpoints/ProbeEndpointsStrategy.java
View file @
09ac0fee
...
...
@@ -27,8 +27,10 @@ import reactor.core.publisher.Mono;
import
java.net.URI
;
import
java.util.Arrays
;
import
java.util.Collection
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
import
org.springframework.util.Assert
;
import
org.springframework.web.reactive.function.client.ClientResponse
;
import
org.springframework.web.util.UriComponentsBuilder
;
public
class
ProbeEndpointsStrategy
implements
EndpointDetectionStrategy
{
...
...
@@ -56,15 +58,14 @@ public class ProbeEndpointsStrategy implements EndpointDetectionStrategy {
.
path
(
endpoint
.
getPath
())
.
build
()
.
toUri
();
return
instanceWebClient
.
instance
(
instance
)
.
options
()
.
uri
(
uri
)
.
exchange
()
.
flatMap
(
response
->
response
.
bodyToMono
(
Void
.
class
)
.
then
(
response
.
statusCode
().
is2xxSuccessful
()
?
Mono
.
just
(
true
)
:
Mono
.
empty
()))
.
map
(
r
->
Endpoint
.
of
(
endpoint
.
getId
(),
uri
.
toString
()));
return
instanceWebClient
.
instance
(
instance
).
options
().
uri
(
uri
).
exchange
().
flatMap
(
this
.
convert
(
endpoint
,
uri
));
}
private
Function
<
ClientResponse
,
Mono
<
Endpoint
>>
convert
(
EndpointDefinition
endpoint
,
URI
uri
)
{
return
response
->
response
.
bodyToMono
(
Void
.
class
)
.
then
(
response
.
statusCode
().
is2xxSuccessful
()
?
Mono
.
just
(
Endpoint
.
of
(
endpoint
.
getId
(),
uri
.
toString
()))
:
Mono
.
empty
());
}
@Data
...
...
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