Commit Graph

21168 Commits

Author SHA1 Message Date
yanghuai9 b67de25d67 add @Override in class AnnotationBeanConfigurerAspect 2020-06-23 10:29:03 +02:00
Juergen Hoeller 41b7686378 Upgrade to XStream 1.4.12, HtmlUnit 2.41, Apache HttpClient 5.0.1 2020-06-23 10:27:50 +02:00
izeye a678db3888 Polish
Closes gh-880
2020-06-23 09:51:45 +02:00
Kamil Szymanski 23aeba0e46 Fix typos in WebRequest.checkNotModified docs
Closes gh-1035
2020-06-23 09:45:07 +02:00
Marten Deinum 6316a353bb Reduce String creation in BeanPropertyRowMapper
Prior to this commit the BeanPropertyRowMapper used
String.substring and String.toLowerCase to parse the
field names. This would generate more String than needed.

Instead one could iterate over the internal char[] of the
String and use the Character methods instead. This reduces
the String creation.

Closes gh-25301
2020-06-23 08:53:41 +02:00
Brian Clozel 1f78cede72 Merge branch '5.2.x' 2020-06-22 19:21:32 +02:00
Brian Clozel c4326cb0f5 Fix missing contextPath when mutating ServerHttpRequest
This commit ensures that when mutating `ServerHttpRequest` instances,
the original contextPath information is copied to the request being
built.

Note that mutation on the `contextPath(String)` or `path(String)` should
be reflected to the other. (See their Javadoc for more information).

Fixes gh-25279
2020-06-22 19:13:10 +02:00
Sam Brannen eeb6c10fb7 Polishing 2020-06-22 14:03:06 +02:00
Sam Brannen b733474c64 Polish contribution
See gh-25292
2020-06-22 13:23:40 +02:00
Undefined 53df8ca1f5 Introduce unit tests for IntegerToEnumConverterFactory
Closes gh-25292
2020-06-22 13:12:37 +02:00
Sam Brannen bf5033281b Merge branch '5.2.x' 2020-06-22 11:38:50 +02:00
Sam Brannen 80d1aaec0c Add spring-r2dbc and spring-rsocket to Stack Overflow tags 2020-06-22 11:38:04 +02:00
Arjen Poutsma ed648b793b Merge branch '5.2.x' 2020-06-22 09:50:04 +02:00
Arjen Poutsma 405fdd3a57 Map from charset name rather than Charset
With this commit it is no longer assumed that all charset names in the
JsonEncoding can be resolved by Charset.forName. Instead, we store the
charset name itself, rather than the Charset object.
2020-06-22 09:48:41 +02:00
Rossen Stoyanchev 7cf1ccc415 Use MonoProcessor instead of FluxIdentityProcessor
We just need to signal completion when close() is called. MonoProcessor
should suffice and we can avoid a hard dependency on Reactor 3.4.

See gh-25085
2020-06-22 05:46:25 +01:00
Rossen Stoyanchev 96bbec7ab2 Restore use of tcpConfiguration method
The method wasn't available at first but has been added since to allow
being compatible with both Reactor Netty 0.9 and 1.0.

See gh-25085
2020-06-22 05:45:41 +01:00
Rossen Stoyanchev d627f6049e Update "Forwarded: for" contribution
Closes gh-23582
2020-06-22 05:40:13 +01:00
Kirill Serebrennikov 883ad098f9 Add support for X-Forwarded-For and Forwarded for
See gh-23260, gh-23582
2020-06-22 05:40:13 +01:00
Rossen Stoyanchev ff9daa9377 Adjust WebFlux behavior for @RequestPart List<T>
List<T> support was added relatively late, incorrectly decoding each
part to T which means no way to decode a single part to List<T> and
thatis the most common case (vs multipart parts with the same name).
This behavior was further misaligned with Spring MVC as well as with
the behavior for T[].

Closes gh-22973
2020-06-22 05:40:13 +01:00
Sam Brannen 01fa923e96 Merge branch '5.2.x' 2020-06-21 19:42:43 +02:00
Sam Brannen 0a208a4941 Fix broken link to Stack Overflow tags 2020-06-21 19:41:56 +02:00
Sam Brannen c6e2d1d405 Upgrade JDK 15 CI image to JDK 15 build 28 2020-06-21 19:33:51 +02:00
Sam Brannen ab0e651547 Polish SerializationTestUtils, clean up warnings, etc. 2020-06-20 18:17:03 +02:00
Sam Brannen 9d5881e0ad Suppress warnings, remove unused code, etc. 2020-06-20 17:15:35 +02:00
Sébastien Deleuze 2f0970b184 Fix an AllEncompassingFormHttpMessageConverter regression
Restore previous behavior to configure
Jaxb2RootElementHttpMessageConverter when JAXB but not Jackson are present.

Closes gh-25291
2020-06-20 17:05:13 +02:00
Sébastien Deleuze 63dff520e6 Disable and remove unsupported features from native images
This commit removes load time weaving, CGLIB and Objenesis support
from native images.

GraalDetector has been removed for now because of
https://github.com/oracle/graal/issues/2594. It should be reintroduced
when this bug will be fixed with NativeImageDetector class name.

Closes gh-25179
2020-06-20 17:05:13 +02:00
Rossen Stoyanchev 2d8b2fed8b Avoid dependency on netty-common in DataBufferUtils
See: gh-22594
2020-06-20 15:56:35 +01:00
Rossen Stoyanchev 78d1591e2d Merge branch '5.2.x' 2020-06-19 22:09:43 +01:00
Rossen Stoyanchev b1da89344f MatchableHandlerMapping is backwards compatible 2020-06-19 22:01:51 +01:00
Rossen Stoyanchev f35903f23d Catch IllegalReferenceCountException
Closes gh-22594
2020-06-19 21:58:03 +01:00
Rossen Stoyanchev 21de098756 Dispose on cancel if response not subscribed
Closes gh-25216
2020-06-19 21:58:03 +01:00
Brian Clozel 7391f9b392 Fix Reactor Core DirectProcessor deprecation
As of reactor/reactor-core#2188, `DirectProcessor` variants are
deprecated. This commit replaces them with the new
`FluxIdentityProcessor` variant.

See gh-25085
2020-06-19 22:13:15 +02:00
Brian Clozel 34cb4895c4 Update CI images to use ubuntu:bionic-20200526 2020-06-19 21:50:18 +02:00
Juergen Hoeller 3a653bd35f Deprecate JCA CCI support
Closes gh-25287
2020-06-19 19:19:14 +02:00
Brian Clozel e0e1c12402 Merge branch '5.2.x' 2020-06-19 16:45:35 +02:00
Brian Clozel 9b615ed8c6 Fix missing sslInfo with Reactor Netty and http/2
Prior to this commit, the `SslInfo` would be missing for WebFlux apps
when deployed on Reactor Netty with http/2.

This commit ensures that the request adapter checks the current channel
and the parent channel for the presence of the `SslHander`.
In the case of http/2, the `SslHander` is tied to the parent channel.

Fixes gh-25278
2020-06-19 16:43:34 +02:00
Sam Brannen c418cef68f Merge branch '5.2.x' 2020-06-19 14:42:50 +02:00
Sam Brannen d07be59801 Improve Javadoc for @Value regarding supported expressions
Closes gh-25284
2020-06-19 14:32:36 +02:00
Sébastien Deleuze 1e501f2583 Provide a flag to disable XML support
This commit introduces a spring.xml.ignore system property
which when set to true avoid initializing XML infrastructure.

A typical use case is optimizing GraalVM native image footprint
for applications not using XML. In order to be effective, those
classes should be initialized at build time:

- org.springframework.util.DefaultPropertiesPersister
- org.springframework.core.io.support.PropertiesLoaderUtils
- org.springframework.web.servlet.function.support.RouterFunctionMapping
- org.springframework.web.client.RestTemplate
- org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver
- org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport
- org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter
- org.springframework.http.converter.support.AllEncompassingFormHttpMessageConverter
- org.springframework.http.codec.support.BaseDefaultCodecs
- org.springframework.beans.PropertyEditorRegistrySupport

Closes gh-25151
2020-06-19 09:42:12 +02:00
Rossen Stoyanchev ce728a6c4b Update docs for PathPattern support in WebMvc
Closes gh-24945
2020-06-18 21:16:43 +01:00
Juergen Hoeller 2d5f9723fa Deprecate superseded Object[] signatures in JdbcOperations/JdbcTemplate
Closes gh-25272
2020-06-18 17:47:27 +02:00
Sébastien Deleuze 1c75f95be0 Provide a flag to disable SpEL support
This commit introduces a spring.spel.ignore system property
which when set to true avoid initializing SpEL infrastructure.

A typical use case is optimizing GraalVM native image footprint
for applications not using SpEL. In order to be effective, those
classes should be initialized at build time:

- org.springframework.context.support.AbstractApplicationContext
- org.springframework.core.SpringProperties
- org.springframework.context.event.EventListenerMethodProcessor

Closes gh-25153
2020-06-18 17:08:15 +02:00
Sam Brannen dc3801043f Merge branch '5.2.x' 2020-06-18 14:55:02 +02:00
Sam Brannen 46c786167e Replace "blacklist" with alternative words
See gh-25262
2020-06-18 14:54:33 +02:00
Sam Brannen 96b03c587f Revert "Upgrade to Kotlin 1.4 M2" for spring-r2dbc 2020-06-18 14:14:42 +02:00
Sébastien Deleuze 6b355df903 Revert "Upgrade to Kotlin 1.4 M2"
This reverts commit 2a74eff10f.

Some regressions require to wait at least Kotlin 1.4 M3.
2020-06-18 14:06:39 +02:00
Brian Clozel 6615e9c5ef Support multi-value X-Forwarded-Prefix headers
Prior to this commit, the Forwarded headers for Spring MVC and Spring
WebFlux did not support multiple prefix values for the
`"X-Forwarded-Prefix"` HTTP header.

This commit splits and processes multiple prefixes defined in the
dedicated header.

Closes gh-25254
2020-06-18 13:18:02 +02:00
Marten Deinum bad81cef8a Align DispatcherServlet defaults for Java and XML
Prior to this commit some of the default strategies defined
for the DispatcherServlet weren't included in the default
configuration for both Java and XML configuration.

The following default beans have been added to the configuration
with the name as expected by the DispatcherServlet:

- org.springframework.web.servlet.i18n.AcceptHeaderLocaleResolver
- org.springframework.web.servlet.theme.FixedThemeResolver
- org.springframework.web.servlet.support.SessionFlashMapManager
- org.springframework.web.servlet.view.DefaultRequestToViewNameTranslator

Closes gh-25209
2020-06-18 12:30:49 +02:00
Sam Brannen edf25ce98a Polish ResourceBundleMessageSourceTests
- suppress warnings
- make tests faster (by sleeping less)
2020-06-18 11:49:44 +02:00
陈其苗 d60c55c296 Use computeIfAbsent in ResourceBundleMessageSource
Closes gh-25072
2020-06-18 11:07:24 +02:00