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
fb1234a2
Commit
fb1234a2
authored
Aug 04, 2020
by
Brian Clozel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upgrade to Reactor 2020.0.0 SNAPSHOTs
See gh-22667
parent
d0507ac2
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
14 additions
and
13 deletions
+14
-13
build.gradle
...t-project/spring-boot-actuator-autoconfigure/build.gradle
+1
-1
build.gradle
spring-boot-project/spring-boot-actuator/build.gradle
+1
-1
MetricsWebClientFilterFunction.java
...s/web/reactive/client/MetricsWebClientFilterFunction.java
+4
-3
WebFluxEndpointIntegrationTests.java
...ndpoint/web/reactive/WebFluxEndpointIntegrationTests.java
+1
-1
build.gradle
spring-boot-project/spring-boot-autoconfigure/build.gradle
+1
-1
build.gradle
spring-boot-project/spring-boot-dependencies/build.gradle
+1
-1
build.gradle
spring-boot-project/spring-boot-docs/build.gradle
+1
-1
build.gradle
...t-starters/spring-boot-starter-reactor-netty/build.gradle
+1
-1
build.gradle
spring-boot-project/spring-boot-test/build.gradle
+1
-1
build.gradle
spring-boot-project/spring-boot/build.gradle
+1
-1
GracefulShutdown.java
...ngframework/boot/web/embedded/netty/GracefulShutdown.java
+1
-1
No files found.
spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle
View file @
fb1234a2
...
@@ -58,7 +58,7 @@ dependencies {
...
@@ -58,7 +58,7 @@ dependencies {
optional
(
"io.micrometer:micrometer-registry-signalfx"
)
optional
(
"io.micrometer:micrometer-registry-signalfx"
)
optional
(
"io.micrometer:micrometer-registry-statsd"
)
optional
(
"io.micrometer:micrometer-registry-statsd"
)
optional
(
"io.micrometer:micrometer-registry-wavefront"
)
optional
(
"io.micrometer:micrometer-registry-wavefront"
)
optional
(
"io.projectreactor.netty:reactor-netty"
)
optional
(
"io.projectreactor.netty:reactor-netty
-http
"
)
optional
(
"io.r2dbc:r2dbc-pool"
)
optional
(
"io.r2dbc:r2dbc-pool"
)
optional
(
"io.r2dbc:r2dbc-spi"
)
optional
(
"io.r2dbc:r2dbc-spi"
)
optional
(
"jakarta.jms:jakarta.jms-api"
)
optional
(
"jakarta.jms:jakarta.jms-api"
)
...
...
spring-boot-project/spring-boot-actuator/build.gradle
View file @
fb1234a2
...
@@ -84,7 +84,7 @@ dependencies {
...
@@ -84,7 +84,7 @@ dependencies {
testImplementation
(
"org.springframework:spring-test"
)
testImplementation
(
"org.springframework:spring-test"
)
testImplementation
(
"com.squareup.okhttp3:mockwebserver"
)
testImplementation
(
"com.squareup.okhttp3:mockwebserver"
)
testRuntimeOnly
(
"io.projectreactor.netty:reactor-netty"
)
testRuntimeOnly
(
"io.projectreactor.netty:reactor-netty
-http
"
)
testRuntimeOnly
(
"javax.xml.bind:jaxb-api"
)
testRuntimeOnly
(
"javax.xml.bind:jaxb-api"
)
testRuntimeOnly
(
"org.apache.tomcat.embed:tomcat-embed-el"
)
testRuntimeOnly
(
"org.apache.tomcat.embed:tomcat-embed-el"
)
testRuntimeOnly
(
"org.glassfish.jersey.ext:jersey-spring5"
)
testRuntimeOnly
(
"org.glassfish.jersey.ext:jersey-spring5"
)
...
...
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/web/reactive/client/MetricsWebClientFilterFunction.java
View file @
fb1234a2
...
@@ -24,6 +24,7 @@ import io.micrometer.core.instrument.Tag;
...
@@ -24,6 +24,7 @@ import io.micrometer.core.instrument.Tag;
import
reactor.core.publisher.Mono
;
import
reactor.core.publisher.Mono
;
import
reactor.core.publisher.SignalType
;
import
reactor.core.publisher.SignalType
;
import
reactor.util.context.Context
;
import
reactor.util.context.Context
;
import
reactor.util.context.ContextView
;
import
org.springframework.boot.actuate.metrics.AutoTimer
;
import
org.springframework.boot.actuate.metrics.AutoTimer
;
import
org.springframework.web.reactive.function.client.ClientRequest
;
import
org.springframework.web.reactive.function.client.ClientRequest
;
...
@@ -74,12 +75,12 @@ public class MetricsWebClientFilterFunction implements ExchangeFilterFunction {
...
@@ -74,12 +75,12 @@ public class MetricsWebClientFilterFunction implements ExchangeFilterFunction {
return
next
.
exchange
(
request
);
return
next
.
exchange
(
request
);
}
}
return
next
.
exchange
(
request
).
as
((
responseMono
)
->
instrumentResponse
(
request
,
responseMono
))
return
next
.
exchange
(
request
).
as
((
responseMono
)
->
instrumentResponse
(
request
,
responseMono
))
.
subscriberContext
(
this
::
putStartTime
);
.
contextWrite
(
this
::
putStartTime
);
}
}
private
Mono
<
ClientResponse
>
instrumentResponse
(
ClientRequest
request
,
Mono
<
ClientResponse
>
responseMono
)
{
private
Mono
<
ClientResponse
>
instrumentResponse
(
ClientRequest
request
,
Mono
<
ClientResponse
>
responseMono
)
{
final
AtomicBoolean
responseReceived
=
new
AtomicBoolean
();
final
AtomicBoolean
responseReceived
=
new
AtomicBoolean
();
return
Mono
.
defer
WithContext
((
ctx
)
->
responseMono
.
doOnEach
((
signal
)
->
{
return
Mono
.
defer
Contextual
((
ctx
)
->
responseMono
.
doOnEach
((
signal
)
->
{
if
(
signal
.
isOnNext
()
||
signal
.
isOnError
())
{
if
(
signal
.
isOnNext
()
||
signal
.
isOnError
())
{
responseReceived
.
set
(
true
);
responseReceived
.
set
(
true
);
Iterable
<
Tag
>
tags
=
this
.
tagProvider
.
tags
(
request
,
signal
.
get
(),
signal
.
getThrowable
());
Iterable
<
Tag
>
tags
=
this
.
tagProvider
.
tags
(
request
,
signal
.
get
(),
signal
.
getThrowable
());
...
@@ -98,7 +99,7 @@ public class MetricsWebClientFilterFunction implements ExchangeFilterFunction {
...
@@ -98,7 +99,7 @@ public class MetricsWebClientFilterFunction implements ExchangeFilterFunction {
.
register
(
this
.
meterRegistry
).
record
(
System
.
nanoTime
()
-
startTime
,
TimeUnit
.
NANOSECONDS
);
.
register
(
this
.
meterRegistry
).
record
(
System
.
nanoTime
()
-
startTime
,
TimeUnit
.
NANOSECONDS
);
}
}
private
Long
getStartTime
(
Context
context
)
{
private
Long
getStartTime
(
Context
View
context
)
{
return
context
.
get
(
METRICS_WEBCLIENT_START_TIME
);
return
context
.
get
(
METRICS_WEBCLIENT_START_TIME
);
}
}
...
...
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/reactive/WebFluxEndpointIntegrationTests.java
View file @
fb1234a2
...
@@ -141,7 +141,7 @@ class WebFluxEndpointIntegrationTests
...
@@ -141,7 +141,7 @@ class WebFluxEndpointIntegrationTests
@Bean
@Bean
WebFilter
webFilter
()
{
WebFilter
webFilter
()
{
return
(
exchange
,
chain
)
->
chain
.
filter
(
exchange
).
subscriberContext
(
return
(
exchange
,
chain
)
->
chain
.
filter
(
exchange
).
contextWrite
(
ReactiveSecurityContextHolder
.
withAuthentication
(
new
UsernamePasswordAuthenticationToken
(
"Alice"
,
ReactiveSecurityContextHolder
.
withAuthentication
(
new
UsernamePasswordAuthenticationToken
(
"Alice"
,
"secret"
,
Arrays
.
asList
(
new
SimpleGrantedAuthority
(
"ROLE_ACTUATOR"
)))));
"secret"
,
Arrays
.
asList
(
new
SimpleGrantedAuthority
(
"ROLE_ACTUATOR"
)))));
}
}
...
...
spring-boot-project/spring-boot-autoconfigure/build.gradle
View file @
fb1234a2
...
@@ -29,7 +29,7 @@ dependencies {
...
@@ -29,7 +29,7 @@ dependencies {
optional
(
"com.sun.mail:jakarta.mail"
)
optional
(
"com.sun.mail:jakarta.mail"
)
optional
(
"de.flapdoodle.embed:de.flapdoodle.embed.mongo"
)
optional
(
"de.flapdoodle.embed:de.flapdoodle.embed.mongo"
)
optional
(
"io.lettuce:lettuce-core"
)
optional
(
"io.lettuce:lettuce-core"
)
optional
(
"io.projectreactor.netty:reactor-netty"
)
optional
(
"io.projectreactor.netty:reactor-netty
-http
"
)
optional
(
"io.r2dbc:r2dbc-spi"
)
optional
(
"io.r2dbc:r2dbc-spi"
)
optional
(
"io.r2dbc:r2dbc-pool"
)
optional
(
"io.r2dbc:r2dbc-pool"
)
optional
(
"io.rsocket:rsocket-core"
)
optional
(
"io.rsocket:rsocket-core"
)
...
...
spring-boot-project/spring-boot-dependencies/build.gradle
View file @
fb1234a2
...
@@ -1317,7 +1317,7 @@ bom {
...
@@ -1317,7 +1317,7 @@ bom {
]
]
}
}
}
}
library
(
"Reactor Bom"
,
"2020.0.0-
M1
"
)
{
library
(
"Reactor Bom"
,
"2020.0.0-
SNAPSHOT
"
)
{
group
(
"io.projectreactor"
)
{
group
(
"io.projectreactor"
)
{
imports
=
[
imports
=
[
"reactor-bom"
"reactor-bom"
...
...
spring-boot-project/spring-boot-docs/build.gradle
View file @
fb1234a2
...
@@ -69,7 +69,7 @@ dependencies {
...
@@ -69,7 +69,7 @@ dependencies {
implementation
(
project
(
path:
":spring-boot-project:spring-boot-test-autoconfigure"
))
implementation
(
project
(
path:
":spring-boot-project:spring-boot-test-autoconfigure"
))
implementation
(
"com.zaxxer:HikariCP"
)
implementation
(
"com.zaxxer:HikariCP"
)
implementation
(
"io.micrometer:micrometer-core"
)
implementation
(
"io.micrometer:micrometer-core"
)
implementation
(
"io.projectreactor.netty:reactor-netty"
)
implementation
(
"io.projectreactor.netty:reactor-netty
-http
"
)
implementation
(
"jakarta.servlet:jakarta.servlet-api"
)
implementation
(
"jakarta.servlet:jakarta.servlet-api"
)
implementation
(
"org.apache.commons:commons-dbcp2"
)
implementation
(
"org.apache.commons:commons-dbcp2"
)
implementation
(
"org.apache.kafka:kafka-streams"
)
implementation
(
"org.apache.kafka:kafka-streams"
)
...
...
spring-boot-project/spring-boot-starters/spring-boot-starter-reactor-netty/build.gradle
View file @
fb1234a2
...
@@ -5,5 +5,5 @@ plugins {
...
@@ -5,5 +5,5 @@ plugins {
description
=
"Starter for using Reactor Netty as the embedded reactive HTTP server."
description
=
"Starter for using Reactor Netty as the embedded reactive HTTP server."
dependencies
{
dependencies
{
api
(
"io.projectreactor.netty:reactor-netty"
)
api
(
"io.projectreactor.netty:reactor-netty
-http
"
)
}
}
spring-boot-project/spring-boot-test/build.gradle
View file @
fb1234a2
...
@@ -14,7 +14,7 @@ dependencies {
...
@@ -14,7 +14,7 @@ dependencies {
optional
(
"com.fasterxml.jackson.core:jackson-databind"
)
optional
(
"com.fasterxml.jackson.core:jackson-databind"
)
optional
(
"com.google.code.gson:gson"
)
optional
(
"com.google.code.gson:gson"
)
optional
(
"com.jayway.jsonpath:json-path"
)
optional
(
"com.jayway.jsonpath:json-path"
)
optional
(
"io.projectreactor.netty:reactor-netty"
)
optional
(
"io.projectreactor.netty:reactor-netty
-http
"
)
optional
(
"javax.json.bind:javax.json.bind-api"
)
optional
(
"javax.json.bind:javax.json.bind-api"
)
optional
(
"javax.servlet:javax.servlet-api"
)
optional
(
"javax.servlet:javax.servlet-api"
)
optional
(
"junit:junit"
)
optional
(
"junit:junit"
)
...
...
spring-boot-project/spring-boot/build.gradle
View file @
fb1234a2
...
@@ -25,7 +25,7 @@ dependencies {
...
@@ -25,7 +25,7 @@ dependencies {
optional
(
"com.zaxxer:HikariCP"
)
optional
(
"com.zaxxer:HikariCP"
)
optional
(
"io.netty:netty-tcnative-boringssl-static"
)
optional
(
"io.netty:netty-tcnative-boringssl-static"
)
optional
(
"io.projectreactor:reactor-tools"
)
optional
(
"io.projectreactor:reactor-tools"
)
optional
(
"io.projectreactor.netty:reactor-netty"
)
optional
(
"io.projectreactor.netty:reactor-netty
-http
"
)
optional
(
"io.rsocket:rsocket-core"
)
optional
(
"io.rsocket:rsocket-core"
)
optional
(
"io.rsocket:rsocket-transport-netty"
)
optional
(
"io.rsocket:rsocket-transport-netty"
)
optional
(
"io.undertow:undertow-servlet"
)
{
optional
(
"io.undertow:undertow-servlet"
)
{
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/netty/GracefulShutdown.java
View file @
fb1234a2
...
@@ -58,7 +58,7 @@ final class GracefulShutdown {
...
@@ -58,7 +58,7 @@ final class GracefulShutdown {
private
void
doShutdown
(
GracefulShutdownCallback
callback
,
DisposableServer
server
)
{
private
void
doShutdown
(
GracefulShutdownCallback
callback
,
DisposableServer
server
)
{
this
.
shuttingDown
=
true
;
this
.
shuttingDown
=
true
;
try
{
try
{
server
.
disposeNow
(
Duration
.
of
Milli
s
(
Long
.
MAX_VALUE
));
server
.
disposeNow
(
Duration
.
of
Nano
s
(
Long
.
MAX_VALUE
));
logger
.
info
(
"Graceful shutdown complete"
);
logger
.
info
(
"Graceful shutdown complete"
);
callback
.
shutdownComplete
(
GracefulShutdownResult
.
IDLE
);
callback
.
shutdownComplete
(
GracefulShutdownResult
.
IDLE
);
}
}
...
...
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