Commit Graph

20123 Commits

Author SHA1 Message Date
Sam Brannen fc42ca2866 Polish contribution
See gh-24157
2019-12-07 13:41:43 +01:00
yokotaso d7d474f658 Do not cache prototype @ControllerAdvice beans
Spring Framework 5.2 introduced support for caching @ControllerAdvice
beans; however, this caching was also applied incorrectly to
non-singleton beans.

This commit addresses this regression by only caching singleton
@ControllerAdvice beans.

Closes gh-24157
2019-12-07 13:39:30 +01:00
Sam Brannen 55ae3c5e87 Polishing 2019-12-07 12:59:03 +01:00
Sam Brannen de8a6c8c57 Polishing 2019-12-06 19:08:54 +01:00
Eric Helgeson d4d940e6e3 Add missing backtick in WebSocket documentation
Closes gh-24155
2019-12-06 19:02:22 +01:00
stsypanov 484006ce90 Hoist Class.getName() from String concatenation to dodge an issue related to profile pollution 2019-12-06 17:36:07 +01:00
Phillip Webb 7c84695333 Support variable resolution of wildcard types
Update `ResolvableType` so that variable referenced can be resolved
against wildcard types. Prior to this commit, given a type:

	Map<String, ? extends List<? extends CharSequence>>

Calling `type.getGeneric(1).asCollection().resolveGeneric()` would
return `null`. This was because the `List` variable `E` referenced a
wildcard type which `resolveVariable` did not support.

Closes gh-24145
2019-12-06 13:38:46 +01:00
Sam Brannen a4fa6a7a31 Test status quo for @Inherited annotation support in AnnotationMetadata 2019-12-05 23:30:14 +01:00
Sam Brannen 3b9d1a00b0 Polishing 2019-12-05 22:37:00 +01:00
Juergen Hoeller c2141e2e93 Add @since tags to firstElement methods 2019-12-05 16:36:55 +01:00
Vitalii Rastvorov d503bc2804 Add firstElement to CollectionUtils 2019-12-05 16:26:25 +01:00
Johnny Lim 14ce84cebb Fix status code in webflux.adoc 2019-12-05 12:25:04 +00:00
Rossen Stoyanchev 828fe39523 Consistently use releaseBody in DefaultWebClient
See gh-24125
2019-12-04 18:19:52 +00:00
Rossen Stoyanchev 3a48682226 Replace ReadCancellationException with takeWhile
Closes gh-24125
2019-12-04 18:19:52 +00:00
Rossen Stoyanchev b866d4209c Add UriUtils.encodeQueryParams
Closes gh-24043
2019-12-04 17:33:31 +00:00
Rossen Stoyanchev 797f618f2b Remove mismatched marker in core-beans.adoc
Closes gh-24132
2019-12-04 16:14:14 +00:00
Sam Brannen fb13f6f0bc Add integration test for gh-24110 2019-12-03 16:48:30 +01:00
wanxiangming1994 6f15f32be3 Honor default values for implicit aliases in composed annotations
Spring Framework 5.2 introduced a regression for implicit aliases
declared via @AliasFor. Specifically, Spring's merged annotation
algorithms stopped honoring default values for implicit alias pairs if
the composed annotation was used without specifying the aliased
attributes.

This commit fixes this regression.

Closes gh-24110
2019-12-03 16:14:49 +01:00
Spring Buildmaster 1bff7ce141 Next Development Version 2019-12-03 08:59:24 +00:00
Brian Clozel 21053780ef Polish 2019-12-02 23:13:44 +01:00
Brian Clozel decbb9ccf9 Provide default codecs config callback to custom codecs
As a follow-up of gh-23961, this change provides a way for custom codecs
to align with the default codecs' behavior on common features like
buffer size limits and logging request details.

Closes gh-24118
Co-authored-by: Rossen Stoyanchev <rstoyanchev@pivotal.io>
2019-12-02 22:52:55 +01:00
Wang Xuesong d1ab81587c [*.*] is displayed as [bold .] and needs to be escaped
execution(* com.xyz.service.*.*(..))  ->  execution(* com.xyz.service.\*.*(..))

Closes gh-24108
2019-12-02 19:14:18 +01:00
Rossen Stoyanchev fcbc437825 Polishing (follow-up on acfeb7) 2019-12-02 17:14:13 +00:00
Brian Clozel 35b7f3bf34 Unpublish Gradle metadata
See gh-23503
2019-12-02 16:43:02 +01:00
Sam Brannen 279777b2f3 Polishing 2019-12-02 16:22:40 +01:00
Rossen Stoyanchev 50ac8ad8b7 Fix checkstyle violation 2019-12-02 14:25:00 +00:00
Rossen Stoyanchev acfeb77d41 Polishing
See gh-23961
2019-12-02 14:12:59 +00:00
Brian Clozel d4209392d2 Allow ExchangeStrategies customizations in WebClient
Prior to this commit, developers could configure their WebClient to use
their custom `ExchangeStrategies`, by providing it in the
`WebClient.Builder` chain.
Once created, an `ExchangeStrategies` instance is not mutable, which
makes it hard for further customizations by other components. In the
case of the reported issue, other components would override the default
configuration for the codecs maxInMemorySize.

This commit makes the `ExchangeStrategies` mutable and uses that fact to
further customize them with a new `WebClient.Builder#exchangeStrategies`
`Consumer` variant. This commit is also deprecating those mutating
variants in favor of a new `WebClient.Builder#exchangeStrategies` that
takes a `ExchangeStrategies#Builder` directly and avoids mutation issues
altogether.

Closes gh-23961
2019-12-02 14:12:59 +00:00
Juergen Hoeller 17e2a0c7ea Upgrade to AspectJ 1.9.5 and Checkstyle 8.27 2019-12-02 12:59:02 +01:00
Brian Clozel 1560bbd81e Revert "Allow ExchangeStrategies customizations in WebClient"
This reverts commit b3020bc484.
2019-12-02 10:39:53 +01:00
Juergen Hoeller 1548a0c9a0 Upgrade to Mockito 3.2 2019-12-02 00:28:08 +01:00
Juergen Hoeller 32e7adfa32 Polishing 2019-12-01 02:00:40 +01:00
Juergen Hoeller 91b557eb4b Polishing 2019-12-01 01:21:53 +01:00
Juergen Hoeller 567c7695dd Polishing 2019-12-01 00:20:00 +01:00
Juergen Hoeller 2267080ff4 Upgrade to Protobuf 3.11 and Apache Johnzon 1.2.2 2019-12-01 00:14:16 +01:00
Brian Clozel b3020bc484 Allow ExchangeStrategies customizations in WebClient
Prior to this commit, developers could configure their WebClient to use
their custom `ExchangeStrategies`, by providing it in the
`WebClient.Builder` chain.
Once created, an `ExchangeStrategies` instance is not mutable, which
makes it hard for further customizations by other components. In the
case of the reported issue, other components would override the default
configuration for the codecs maxInMemorySize.

This commit makes the `ExchangeStrategies` mutable and uses that fact to
further customize them with a new `WebClient.Builder#exchangeStrategies`
`Consumer` variant. This commit is also deprecating those mutating
variants in favor of a new `WebClient.Builder#exchangeStrategies` that
takes a `ExchangeStrategies#Builder` directly and avoids mutation issues
altogether.

Closes gh-23961
2019-11-29 22:26:52 +01:00
Sam Brannen d7023fd02b Delete unused JdbcTemplate fields in examples
Closes gh-24085
2019-11-29 19:01:42 +01:00
Sam Brannen 52a1fc4329 Polish BatchPreparedStatementSetter example in reference manual
Closes gh-24084
2019-11-29 18:50:42 +01:00
Sam Brannen 5648ef3276 Fix examples for <tx:method/> settings in reference manual
Closes gh-24080
2019-11-29 18:41:59 +01:00
Andy Wilkinson 7f61f3852c Enable reading from the remote build cache for all
Previously, the remote build cache was only enabled if the
GRADLE_ENTERPRISE_URL environment variable was configured. This meant
that contributors would not benefit from the build time improvements
of the caching without some additional setup.

This commit updates the buildCache configuration so that reading from
the remote build cache at https://ge.spring.io is enabled for all.
Pushing to the cache continues to be disabled unless the required
credentials are provided. Build scan configuration has also been
updated in line with this change. While the server URL is now
hardcoded, publishing is still opt-in via an environment variable.
The exact mechanism by which someone can opt in will change in the
future once some server-side changes have been made. At this point,
only a change to publishAlwaysIf should be necessary.

Closes gh-24105
2019-11-29 17:58:09 +01:00
Sam Brannen 093323beeb Introduce Checkstyle rule to prohibit class names ending with "Test" 2019-11-29 17:30:29 +01:00
Rossen Stoyanchev c18d1ce7ca Merge pull request #24074
Closes gh-24074
2019-11-29 15:55:14 +00:00
Rossen Stoyanchev 395c1e415c Polishing contribution
See gh-24074
2019-11-29 15:54:58 +00:00
Frederik Boster a15a726fef Improve getMultipartContentType in mock request.
See gh-24074
2019-11-29 15:54:58 +00:00
Rossen Stoyanchev 47779df896 Merge pull request #24087
Closes gh-24087
2019-11-29 15:54:15 +00:00
Rossen Stoyanchev 25f3465f1f Polishing contribution
See gh-24087
2019-11-29 15:53:37 +00:00
Parviz ROzikov e858b21c60 #24022 - added protobuf MessageConverter 2019-11-29 14:20:05 +00:00
Sam Brannen d9ebc3bbc4 Polish StringArrayPropertyEditor[Tests] 2019-11-29 14:55:18 +01:00
Sam Brannen 7cedffc707 Support @Inherited again in reflection-based AnnotationMetadata
Spring Framework 5.2 introduced a regression in reflection-based
AnnotationMetadata. Specifically, as of 5.2, StandardAnnotationMetadata
no longer found @Inherited annotations from superclasses.

This commit fixes this regression by switching to the INHERITED_ANNOTATIONS
SearchStrategy when creating the MergedAnnotations used within
StandardAnnotationMetadata,

Note, however, that the discrepancy between StandardAnnotationMetadata
and SimpleAnnotationMetadata (i.e., reflection-based vs. ASM-based)
regarding @Inherited support still remains as it was prior to Spring
Framework 5.2.

Closes gh-24077
2019-11-29 00:07:44 +01:00
Sam Brannen 85016aef30 Test status quo for @Inherited annotations in AnnotationMetadata
This commit introduces failing assertions that are currently disabled
via a boolean reproduceGh24077 flag.

Setting that flag to true demonstrates the regression for
StandardAnnotationMetadata and inconsistencies for SimpleAnnotationMetadata.

See gh-24077
2019-11-28 18:45:58 +01:00