Commit Graph

25657 Commits

Author SHA1 Message Date
Arjen Poutsma
4e76a4780c Add ServerResponse.async() in WebMvc.fn
This commit introduces a new async(Object) method in the WebMvc.fn,
taking a asynchronous response as argument in the form of a
CompletableFuture or Publisher. This allows for asynchronous setting
of headers and status (and not just body, which was already possible).

Closes gh-25828
2020-10-02 10:36:16 +02:00
Sam Brannen
c083b95ce1 Polishing 2020-10-01 15:42:06 +02:00
Sam Brannen
92cc006b2c Delete unused code 2020-10-01 15:14:55 +02:00
Rossen Stoyanchev
dfb7ca733a Merge branch '5.2.x' into master 2020-09-30 22:10:42 +01:00
Rossen Stoyanchev
86f2ebec1b Fix recursion issue caused by previous commit
See gh-25821
2020-09-30 22:03:46 +01:00
Rossen Stoyanchev
7ad60d385b Fix issue with copying headers in NativeMessageHeaderAccessor
Closes gh-25821
2020-09-30 21:42:26 +01:00
Rossen Stoyanchev
4b9c3fa739 Polishing Javadoc
See gh-25821
2020-09-30 21:42:26 +01:00
Sam Brannen
a6bede22c1 Polish contribution
See gh-23379
2020-09-29 14:25:04 +02:00
Josh Cummings
a0c00362c3 Introduce Converter.andThen(...)
Closes gh-23379
2020-09-29 14:04:57 +02:00
Arjen Poutsma
8057fb38b2 DefaultPartHttpMessageReader reference docs
This commit changes the WebFlux reference documentation from the
SynchronossPartHttpMessageReader to the DefaultPartHttpMessageReader.

Closes gh-25827
2020-09-28 10:19:49 +02:00
Sam Brannen
ba94a1216c Deprecate HttpStatus.Series.valueOf(HttpStatus) and polish
See gh-22366
2020-09-26 16:06:31 +02:00
Nico Heller
97cc89630d Remove inefficiency in HttpStatus.series()
Prior to this commit, the Series value for an HttpStatus was always
evaluated which resulted in an allocation of a Series array by invoking
Series.values() which makes a defensive copy.

This commit addresses this issue by hardcoding the corresponding Series
within the HttpStatus constructor, thereby avoiding any unnecessary
computations. In addition, a unit test has been added to verify that
all HttpStatus enum constants have a properly configured Series.

Closes gh-22366
2020-09-26 15:04:15 +02:00
Sam Brannen
b34778d220 Polishing 2020-09-26 15:02:15 +02:00
Rossen Stoyanchev
c45be0bf27 Polishing contribution
Closes gh-25780
2020-09-25 21:53:20 +01:00
Anthony Raymond
10eb5bde59 Do not resolve Principal argument if annotated
Closes gh-25780
2020-09-25 21:47:35 +01:00
Rossen Stoyanchev
52084ed954 Update WebFlux docs on logging with async appenders
Closes gh-25547
2020-09-25 21:44:35 +01:00
Rossen Stoyanchev
b9ef5416b9 Expose combine method in CorsConfiguration
Closes gh-25716
2020-09-25 21:36:18 +01:00
Rossen Stoyanchev
852e904b08 Exposes getter for part converters in FormHttpMessageConverter
Closes gh-25817
2020-09-25 21:31:44 +01:00
Rossen Stoyanchev
bedf2de614 Merge branch '25751-exchange-deprecation' into master
Closes gh-25751
2020-09-25 21:17:25 +01:00
Rossen Stoyanchev
10c5f85a9f WebTestClient documentation updates
See gh-25751
2020-09-25 21:17:07 +01:00
Rossen Stoyanchev
db9190e0e6 Remove use of WebClient#exchange from WebTestClient
The exchange() method is now deprecated because it is not safe for
general use but that doesn't apply to the WebTestClient because it
exposes a different higher level API for response handling that
ensures the response is consumed. Nevertheless WebTestClient cannot
call WebClient.exchange() any more.

To fix this WebTestClient no longer delegates to WebClient and thus
gains direct access to the underlying ExchangeFunction. This is
not a big deal because WebClient and WebTestClient do the same
only when it comes to gathering builder options and request input.

See gh-25751
2020-09-25 21:16:44 +01:00
Rossen Stoyanchev
1404dd768f Add exchangeToMono and exchangeToFlux + deprecate exchange()
See gh-25751
2020-09-25 21:16:44 +01:00
Juergen Hoeller
3e4ce9a348 Upgrade to OpenPDF 1.3.22 and Mockito 3.5.13 2020-09-25 20:49:40 +02:00
Juergen Hoeller
7116e5f755 Polishing 2020-09-25 20:40:54 +02:00
Sébastien Deleuze
2dbceb9053 Deprecate LiveBeansView
This commit deprecates LiveBeansView and related classes in order to allow
a future removal in order to increase the separation of concerns between
Spring Framework and Spring Boot, and the consistency between JVM
and native.

Closes gh-25820
2020-09-25 20:04:34 +02:00
Sébastien Deleuze
84b1efa4b8 Merge branch '5.2.x' 2020-09-25 15:23:31 +02:00
Sam Brannen
6aa522b3c1 Apply LONG_RUNNING test group properly
See gh-24830
2020-09-25 14:25:16 +02:00
Sébastien Deleuze
b322cbd625 Add missing @Nullable to WebFlux RequestMappingHandlerMapping
Closes gh-25657
2020-09-25 14:22:53 +02:00
Brian Clozel
e33e7d7681 Remove TestGroup.PERFORMANCE
Now that there's a new JMH infrastructure for benchmarks and that
performance tests have been rewritten to use it, we should remove the
`PERFORMANCE` `TestGroup` to avoid introducing such tests in the future.

Closes gh-24830
2020-09-25 13:43:38 +02:00
Brian Clozel
61d893257e Rewrite "performance" test to JMH benchmarks
This commit rewrites the remaining "fastEnough" performance tests into
proper JMH benchmarks.

See gh-24830
2020-09-25 13:43:38 +02:00
Brian Clozel
e02d3f32b4 Requalify tests as LONG_RUNNING
Prior to this commit, some tests would belong to the PERFORMANCE
`TestGroup`, while they were not testing for performance but rather
performing functional tests that involve long running operations or
timeouts.

This commit moves those tests to the LONG_RUNNING `TestGroup`.

See gh-24830
2020-09-25 13:43:38 +02:00
Juergen Hoeller
f89bd47188 Merge branch '5.2.x' 2020-09-25 12:52:56 +02:00
Juergen Hoeller
d022fcf32f Explicit note on TransactionalEventListener versus reactive transactions
Closes gh-25805
2020-09-25 12:49:45 +02:00
Juergen Hoeller
e028ef8170 Add MariaDB to the supported database products for functions as well
Closes gh-25811
2020-09-25 12:47:31 +02:00
Juergen Hoeller
6c631e3d5c Merge branch '5.2.x'
# Conflicts:
#	spring-messaging/src/main/java/org/springframework/messaging/converter/MappingJackson2MessageConverter.java
2020-09-25 11:36:18 +02:00
Igor Manushin
9ad5a8ead0 Add KClass variant to Coroutines web API
Closes gh-24967
2020-09-25 11:32:20 +02:00
Juergen Hoeller
6e4fcb69f0 Polishing 2020-09-25 11:26:01 +02:00
Juergen Hoeller
392ad09990 Add MariaDB to the list of supported database products for procedures
Closes gh-25811
2020-09-25 11:25:05 +02:00
Juergen Hoeller
21cb9e8bff Translate NullBean result to null for lookup method with bean name
Closes gh-25806
2020-09-25 11:24:50 +02:00
Juergen Hoeller
c83f6adc24 Revise event multicaster locking for non-synchronized retriever caching
Closes gh-25799
2020-09-25 11:24:26 +02:00
Juergen Hoeller
d9da663f6d Optimize String argument resolution in MessageTag
Closes gh-25809
2020-09-25 11:23:38 +02:00
Juergen Hoeller
c04400890f Avoid repeated Charset resolution in MimeType
Closes gh-25808
2020-09-25 11:23:12 +02:00
Sam Brannen
00651a3e38 Fix forward-merge errors in 6f04c7b60e and 687c3985d5
See gh-24865
2020-09-25 11:22:29 +02:00
Sam Brannen
d7fab85f51 Merge branch '5.2.x' 2020-09-25 11:17:24 +02:00
Sam Brannen
bf00db3c6c Avoid AssertJ deprecation warning 2020-09-25 11:08:51 +02:00
Sam Brannen
f5d36aa47a Revert use of Map::computeIfAbsent in thread and tx scopes
Issues gh-25038 and gh-25618 collectively introduced a regression for
thread-scoped and transaction-scoped beans.

For example, given a thread-scoped bean X that depends on another
thread-scoped bean Y, if the names of the beans (when used as map keys)
end up in the same bucket within a ConcurrentHashMap AND an attempt is
made to retrieve bean X from the ApplicationContext prior to retrieving
bean Y, then the use of Map::computeIfAbsent in SimpleThreadScope
results in recursive access to the same internal bucket in the map.

On Java 8, that scenario simply hangs. On Java 9 and higher,
ConcurrentHashMap throws an IllegalStateException pointing out that a
"Recursive update" was attempted.

In light of these findings, we are reverting the changes made to
SimpleThreadScope and SimpleTransactionScope in commits 50a4fdac6e and
148dc95eb1.

Closes gh-25801
2020-09-25 11:00:06 +02:00
Juergen Hoeller
9795883d91 Avoid repeated Charset resolution in MimeType
Closes gh-25808
2020-09-25 10:51:08 +02:00
Juergen Hoeller
214bc407b4 Provide Gson/JSON-B MessageConverter for spring-messaging (aligned with spring-web)
Closes gh-21496
2020-09-25 10:48:25 +02:00
Shenker93
ad5072a43c optimize StringUtils trimLeadingWhitespace() / trimTrailingWhitespace() & trimLeadingCharacter() / trimTrailingCharacter() utility methods 2020-09-25 10:44:02 +02:00
Brian Clozel
687c3985d5 Fix merge-forward 2020-09-24 19:54:04 +02:00