Commit Graph

25883 Commits

Author SHA1 Message Date
Juergen Hoeller
10f6a22315 Upgrade to Undertow 2.2.3 and Apache HttpCore Reactive 5.0.3 2020-12-07 22:08:50 +01:00
Juergen Hoeller
c970c318f4 Polishing 2020-12-07 22:08:01 +01:00
Juergen Hoeller
834032df1f Clarify intended advice execution behavior (includes related polishing)
Closes gh-26202
2020-12-07 22:06:22 +01:00
Brian Clozel
5efa4ad442 Pull images with registry-image resource in build 2020-12-07 20:38:07 +01:00
Rossen Stoyanchev
7ef3257b03 Correctly determine HttpServletMapping for INCLUDE
Closes gh-26216
2020-12-07 17:44:22 +00:00
Sébastien Deleuze
0172424635 Avoid CGLIB proxies on websocket/messaging configurations
This commit updates websocket and messaging configurations in order
to not use CGLIB proxies anymore. The goal here is to allow support
in native executables and to increase the consistency across the
portfolio.

Closes gh-26227
2020-12-07 12:18:29 +01:00
Sébastien Deleuze
994ec708fc Upgrade to Kotlin Coroutines 1.4.2
Closes gh-26226
2020-12-07 10:49:12 +01:00
Stephane Nicoll
da15fe4c94 Upgrade to Gradle 6.7.1
Closes gh-26225
2020-12-07 10:43:22 +01:00
mplain
a1d134b086 Add missing Kotlin extensions for WebClient.ResponseSpec
Closes gh-26030
2020-12-07 10:34:39 +01:00
Juergen Hoeller
3c85c263d2 Upgrade to Groovy 3.0.7, RxJava 3.0.8, Mockito 3.6.28 2020-12-04 23:29:21 +01:00
Sam Brannen
7b3f53de50 Polish SpelParserTests 2020-12-04 18:49:05 +01:00
VonUniGE
ec7425c1f4 Fix typo in javadoc for ResponseExtractor 2020-12-04 16:18:59 +00:00
limo520
ef05eb3729 Fix assertions in SpelParserTests.generalExpressions
Closes gh-26211

Co-authored-by: fengyuanwei <fengyuanwei@wondersgroup.com>
2020-12-04 13:59:16 +01:00
Rossen Stoyanchev
8ac39a50fe ServletServerHttpResponse reflects Content-Type override
Closes gh-25490
2020-12-03 18:41:18 +00:00
Rossen Stoyanchev
d82cb15439 Ensure both mock files and parts can be provided
Closes gh-26166
2020-12-03 17:53:26 +00:00
Rossen Stoyanchev
8c1d06e0c4 Polishing contribution
Closes gh-25927
2020-12-03 17:16:27 +00:00
shevtsiv
01892c6524 Optimization in ResourceArrayPropertyEditor
The previous implementation uses ArrayList for storing resolved
resources and ArrayList has O(n) time complexity for the contains
operation. By switching to the HashSet for storing resolved
resources we improve the time complexity of this operation to be O(1).

See gh-25927
2020-12-03 17:16:27 +00:00
Brian Clozel
9776929a9d Mention security considerations in Forwarded filters
This commit improves the Javadoc for the `ForwardedHeaderFilter`
(Servlet Filter) and `ForwardedHeaderTransformer` (reactive variant) so
as to mention security considerations linked to Forwarded HTTP headers.

Closes gh-26081
2020-12-03 15:40:31 +01:00
Brian Clozel
4337d8465c Remove spring.event.invoke-listener startup event
Prior to this commit, the `SimpleApplicationEventMulticaster` would be
instrumented with the `ApplicationStartup` and start/stop events for
invoking event listeners (`spring.event.invoke-listener`).

This feature was already limited to single-threaded event publishers,
but is still flawed since several types of events can happen
concurrently. Due to the single-threaded nature of the startup sequence,
our implementation should not produce startup events concurrently.

This can cause issues like gh-26057, where concurrent events lead to
inconcistencies when tracking parent/child relationships.

This commit removes the `spring.event.invoke-listener` startup event as
a result.

Fixes gh-26057
2020-12-03 15:40:31 +01:00
Arjen Poutsma
8f0ad73bfd Merge pull request #26133 from alexfeigin/master
* gh-26133:
  Expose future response in new AsyncServerResponse
2020-12-03 14:51:49 +01:00
Alex Feigin
3714d0e401 Expose future response in new AsyncServerResponse
This commit introduces AsyncServerResponse, an extension of
ServerResponse that is returned from ServerResponse.async and that
allows users to get the future response by calling the block method.
This is particularly useful for testing purposes.
2020-12-03 14:45:56 +01:00
Juergen Hoeller
227d85a6b4 Upgrade to Jackson 2.12, Hibernate ORM 5.4.25, Checkstyle 8.38
See gh-25907
2020-12-02 17:22:22 +01:00
Arjen Poutsma
a1320cd450 Add SSE support to WebMvc.fn
This commit adds support for sending Server-Sent Events in WebMvc.fn,
through the ServerResponse.sse method that takes a SseBuilder DSL.
It also includes reference documentation.

Closes gh-25920
2020-12-02 15:14:47 +01:00
Johnny Lim
c7f2f50c15 Polish ConfigurationClassPostProcessorTests
Closes gh-26197
2020-12-02 15:07:15 +01:00
Juergen Hoeller
396fb0cd51 Support for multi-threaded addConverter calls
Closes gh-26183
2020-12-02 12:25:37 +01:00
Rossen Stoyanchev
5328184f3a ContentCachingResponseWrapper skips contentLength for chunked responses
Closes gh-26182
2020-12-01 17:46:12 +00:00
Rossen Stoyanchev
1e19e51c9c Fix exchangeToMono sample in reference
Closes gh-26189
2020-12-01 17:46:12 +00:00
Arjen Poutsma
69aed83504 Use nested path variables instead of Servlet's
Remove the overriden pathVariable method from the nested request
wrapper,so that the merged attributes are used instead of the ones
provided by servlet.

Closes gh-26163
2020-12-01 11:24:45 +01:00
Arjen Poutsma
0978cc629a Polishing 2020-12-01 11:19:10 +01:00
Rossen Stoyanchev
0c825621b8 Avoid use of Optional wrapper to get List<MediaType>
See gh-26170
2020-11-30 17:30:45 +00:00
Rossen Stoyanchev
e7b0b65244 Support for MediaType mappings in ResourceWebHandler
Closes gh-26170
2020-11-30 17:16:55 +00:00
Stephane Nicoll
e9caee1b6e Start building against Reactor 2020.0.2 snapshots
See gh-26176
2020-11-30 07:21:51 +01:00
Juergen Hoeller
622d0831a3 Polishing 2020-11-27 21:46:45 +01:00
Juergen Hoeller
56dbe06d9b Register @Bean definitions as dependent on containing configuration class
Closes gh-26167
2020-11-27 17:00:16 +01:00
Rossen Stoyanchev
11f6c4e7ab Matching update for copyHeadersIfAbsent
The change to copyHeaders from d46091 also applied to copyHeadersIfPresent.

Closes gh-26155
2020-11-26 21:51:53 +00:00
Rossen Stoyanchev
d46091565b MessageHeaderAccessor handle self-copy correctly
1. Revert changes in setHeader from 5.2.9 that caused regression on self-copy.
2. Update copyHeaders to ensure it still gets a copy of native headers.
3. Exit if source and target are the same instance, as an optimization.

Closes gh-26155
2020-11-26 16:14:51 +00:00
Сергей Цыпанов
42216b77df Remove unused package-private class o.s.w.u.p.SubSequence 2020-11-26 15:31:21 +01:00
Sébastien Deleuze
43faa439ab Refine kotlinx.serialization support
This commit introduces the following changes:
 - Converters/codecs are now used based on generic type info.
 - On WebMvc and WebFlux, kotlinx.serialization is enabled along
   to Jackson because it only serializes Kotlin @Serializable classes
   which is not enough for error or actuator endpoints in Boot as
   described on spring-projects/spring-boot#24238.

TODO: leverage Kotlin/kotlinx.serialization#1164 when fixed.

Closes gh-26147
2020-11-26 12:36:35 +01:00
Juergen Hoeller
1f701d9bad Upgrade to Jetty 9.4.35 2020-11-25 11:41:06 +01:00
Juergen Hoeller
73e1f24ac1 Restore HttpHeaders-based constructor for binary compatibility
Closes gh-26151
2020-11-25 11:36:12 +01:00
Juergen Hoeller
86f9716fef Remove misleading default note on ISO.DATE_TIME
Closes gh-26134
2020-11-25 11:35:06 +01:00
Rossen Stoyanchev
80701082cd Set favorPathExtension to false by default
Applies a change that was intended in #23915 but wasn't.

Closes gh-26119
2020-11-24 17:31:28 +00:00
Arjen Poutsma
3612990344 Polishing 2020-11-24 14:41:39 +01:00
Arjen Poutsma
dea2029e94 Only write non-default charset in MultipartWriterSupport
This commit only writes the 'charset' parameter in the written headers
if it is non-default (not UTF-8), since RFC7578 states that the only
allowed parameter is 'boundary'.

Closes gh-25885
2020-11-24 14:41:39 +01:00
Sam Brannen
77d6f8bc00 Polishing 2020-11-24 14:04:33 +01:00
Rossen Stoyanchev
23006d417b Deprecate context method in WebClient
See gh-25710
2020-11-23 21:46:14 +00:00
Rossen Stoyanchev
d8dafbc49d Add DEBUG log message in MetadataExtractor
Closes gh-26130
2020-11-23 17:22:09 +00:00
Rossen Stoyanchev
cc4a1af091 Ensure AsyncSupportConfigurer is created once
Now that we have two adapters that need access to the configurer, we need
to save it in a field like others.

See gh-25931
2020-11-23 17:22:09 +00:00
Sam Brannen
fd70a9e95d Fix comment
See gh-26140
2020-11-23 17:42:49 +01:00
Sam Brannen
298cb22bfe Ensure that projects can be imported into Eclipse IDE
Recently the Spring Framework projects could no longer be imported into
Eclipse IDE without compilation errors in JMH sources.

This commit addresses this issue by applying workarounds for bugs in
Gradle and the JMH plugin for Gradle.

Gradle bug: https://github.com/gradle/gradle/issues/14932

JMH plugin bug: https://github.com/melix/jmh-gradle-plugin/issues/157

The Gradle bug has already been fixed in Gradle 6.8 RC1; however, the
issue for the JMH plugin bug seems not to have been triaged yet.

Closes gh-26140
2020-11-23 17:24:57 +01:00