Commit Graph

20253 Commits

Author SHA1 Message Date
Brian Clozel a31a4f8148 Copy strategiesConfigurers when cloning WebClient.Builder
This commit fixes the missing `strategiesConfigurers` copy when the
`WebClient.Builder` is cloned.

Fixes gh-24329
2020-01-10 15:59:59 +01:00
Stephane Nicoll bdb9f9570e Polish 2020-01-09 17:08:48 +01:00
Juergen Hoeller f6ca21f6a4 Upgrade to SLF4J 1.7.30 and Checkstyle 8.28 2020-01-09 17:03:30 +01:00
Juergen Hoeller 4936a637fe Polishing 2020-01-09 17:03:17 +01:00
Sam Brannen e8ef93c508 Polish contribution
See gh-24321
2020-01-09 15:56:25 +01:00
lixiaolong11000 047eefd2e2 Improve exception message in AopContext.currentProxy()
Closes gh-24321
2020-01-09 15:56:09 +01:00
Juergen Hoeller b0e4b7e29c Re-calculate SimpleKey's hashCode field on deserialization
Closes gh-24320
2020-01-09 15:39:04 +01:00
Rossen Stoyanchev 08e9372ded Restore response after beforeCommit action errors
See gh-24186
2020-01-09 11:10:44 +00:00
Rossen Stoyanchev 34d32402d3 Return 500 if producible attribute present
When a request is mapped through a producible condition on an
@RequestMapping, then a failure to find a converter/decoder should be
a 500 because the return type + media type pair were declared by the
controller and that should be possible to render.

Closes gh-23287
2020-01-09 11:10:44 +00:00
Andy Wilkinson 1ec15ba9c2 Always configure PDF backend as task will only run on cache miss
Previously, the Asciidoctor task was not cacheable and generating the
PDF documentation was very slow. To improve build times, the PDF
documentation was not generated for snapshot builds.

The upgrade to 2.4.0 of the Asciidoctor Gradle pluging means that the
Asciidoctor task is now cacheable. As such, its tasks will only run
when the documentation has changed. This should allow PDF
documentation to be published for every build without slowing things
down too much and the cost of generating the documentation will only
be incurred when there is a change to the documentation.

See gh-24216
2020-01-09 10:17:44 +01:00
Andy Wilkinson 2ac5744323 Upgrade to Asciidoctor Gradle Plugin 2.4
This commit updates the build to use the latest version of the
Asciidoctor Gradle Plugin. One significant new feature is that the
plugin's tasks are now cacheable.

Closes gh-24216
2020-01-09 10:17:27 +01:00
Juergen Hoeller c39ed52f97 Add since tag to hasMethod(Class, Method)
See gh-24282
2020-01-08 19:05:03 +01:00
stsypanov 8e5cad2af3 Add fast path for ClassUtils.hasMethod() 2020-01-08 18:52:15 +01:00
Juergen Hoeller c562c3a0b3 Upgrade to Netty 4.1.44, Jetty 9.4.25, Undertow 2.0.29, OkHttp 3.14.5, Jackson 2.10.2 2020-01-08 18:38:55 +01:00
Juergen Hoeller 259ffe9b3b Thread-safe compiled expression evaluation in SpelExpression
Closes gh-24265
2020-01-08 18:37:07 +01:00
Rossen Stoyanchev 9d6e40fb1e Merge pull request #24143 from yoshikawaa/patch-1
Closes gh-24143
2020-01-08 16:48:54 +00:00
Rossen Stoyanchev d509d5ae6f Polishing contribution
See gh-24143
2020-01-08 16:47:33 +00:00
Astushi Yoshikawa 53b39eb753 MvcUriComponentsBuilder prepends slash
See gh-24143
2020-01-08 16:47:33 +00:00
Rossen Stoyanchev 1dd5db42ab Merge pull request #24292 from ofaizulin/rd-httpmsgconv-fix-isr-contentlength
Closes gh-24292
2020-01-08 16:19:42 +00:00
Rossen Stoyanchev 01827389ef Polishing contribution
See gh-24292
2020-01-08 16:19:25 +00:00
Oleh Faizulin e96b71acf3 contentLength support for Resource decoding
Expose the known content length, if known, in the InputStreamResource returned by ResourceHttpMessageConverter or
ResourceDecoder.

See gh-24292
2020-01-08 16:19:11 +00:00
Sam Brannen e3e7d90415 Improve documentation for FullyQualifiedAnnotationBeanNameGenerator
See gh-24114
2020-01-08 16:47:39 +01:00
Sam Brannen b4c91e7dac Introduce BeanNameGenerator based on fully qualified class name
Prior to this commit, Spring offered two top-level implementations of
the BeanNameGenerator strategy: DefaultBeanNameGenerator and
AnnotationBeanNameGenerator. The latter is used as the default bean
name generator for beans picked up via component scanning. In a typical
application, this strategy works well; however, if multiple component
scanned beans have the same simple class name (i.e., identical names
ignoring the package), a BeanDefinitionStoreException is thrown.

To address such naming conflicts, users of Spring have had to implement
a custom BeanNameGenerator based on the fully qualified class name of
such components.

Similar conflicts can arise with components registered via
configuration class imports (i.e., via @Import), and
ConfigurationClassPostProcessor addresses this via an anonymous inner
class that extends AnnotationBeanNameGenerator but falls back to using
the fully qualified class name if an explicit bean name is not provided
via an annotation.

This commit extracts the implementation of
ConfigurationClassPostProcessor's internal BeanNameGenerator into a new
top-level FullyQualifiedAnnotationBeanNameGenerator class that can be
used to disambiguate between same-named components residing in
different packages that are picked up via component scanning. This bean
name generator can be configured via @ComponentScan's nameGenerator
attribute.

Closes gh-24114
2020-01-07 19:39:28 +01:00
Sam Brannen e1fb4a1966 Polishing 2020-01-07 18:47:54 +01:00
Sam Brannen ef6b1ba034 Update copyright date 2020-01-07 17:15:23 +01:00
Rossen Stoyanchev 9d963abb7d Concrete MediaType check in StringHttpMessageConverter
Closes gh-23287
2020-01-07 15:02:39 +00:00
stsypanov c480a99a77 Trim line from LineInfo only once 2020-01-07 14:44:09 +01:00
Sam Brannen 55e0ff11ca
Add note regarding ADJT development builds for Eclipse 4.10 2020-01-07 13:59:31 +01:00
Sam Brannen 12a78d1af2 Update copyright date
See gh-24305
2020-01-07 11:36:53 +01:00
GungnirLaevatain 4692f20aac Remove code duplication in AnnotationDrivenBeanDefinitionParser
This commit merges the implementations of getCallableInterceptors()
and getDeferredResultInterceptors() in order to remove code duplication.

Closes gh-24305
2020-01-07 11:35:38 +01:00
Sam Brannen 141dae6437 Polish contribution
See gh-24293
2020-01-07 11:07:03 +01:00
lixiaolong11000 132805133d Improve ExposeInvocationInterceptor exception message
Closes gh-24293
2020-01-07 11:03:11 +01:00
Brian Clozel ffc1f960f9 Polish
See gh-24238
2020-01-07 09:05:49 +01:00
Rossen Stoyanchev ea6d2ea1ce Multi-value headers in ResponseStatusException
Closes gh-24261
2020-01-06 22:13:55 +00:00
Brian Clozel f9c1565f4e Remove Content-* response headers for error handling
Prior to this commit, when WebFlux handlers added `"Content-*"` response
headers and an error happened while handling the request, all those
headers would not be cleared from the response before error handling.

This commit clears those headers from the response in two places:
* when invoking the handler and adapting the response
* when writing the response body

Not removing those headers might break HTTP clients since they're given
wrong information about how to interpret the HTTP response body: the
error response body might be very different from the original one.

Fixes gh-24238
2020-01-06 16:55:08 +01:00
Sam Brannen 59ade91694 Use HTTPS in link
See gh-24268
2020-01-06 14:45:17 +01:00
Sam Brannen c1d0060a6f Recommend third-party alternatives in BeanUtils Javadoc
See gh-24268
2020-01-06 14:41:00 +01:00
Sam Brannen 3299793c8a Polish [Simple]AliasRegistry[Tests] 2020-01-06 11:30:05 +01:00
Qimiao Chen d0c2812dad Optimize SimpleAliasRegistry hasAlias implementation
This commit reduces the number of loops and recursions in
the implementation of SimpleAliasRegistry#hasAlias().

Closes gh-24295
2020-01-06 11:28:24 +01:00
Sam Brannen 328e88d204
Document minimum Buildship and Eclipse requirements 2020-01-06 10:53:20 +01:00
Sam Brannen 22a888b53d Polish test fixture publication skipping config
Thanks to @jjohannes for the tip.

See gh-23550
2020-01-03 14:56:13 +01:00
Sam Brannen 081b3d304d Move JavaUtilLoggingConfigurer to spring-core test fixtures
See gh-23550
2020-01-03 14:34:29 +01:00
Rossen Stoyanchev 92a28392db Merge pull request #24287 from KangZhiDong/master
Closes gh-24287
2020-01-03 11:22:00 +00:00
Rossen Stoyanchev 510ef1ab2e Polishing contribution
See gh-24287
2020-01-03 11:21:07 +00:00
KangZhiDong f585eb0b79 Fix Javadoc typos
See gh-24287
2020-01-03 11:21:07 +00:00
Rossen Stoyanchev 03ea92df99 Improve RestClientException Javadoc
Closes gh-24288
2020-01-03 11:12:01 +00:00
Rossen Stoyanchev 68f9f8116c Fix typo in RSocket reference
See gh-24245
2020-01-03 08:11:14 +00:00
Sam Brannen 3aa2605fda Replace TestSourcesPlugin with Gradle test fixture support
Prior to this series of commits, the Spring Framework build used a
custom TestSourcesPlugin to share test utilities and fixtures between
projects. This plugin served its purpose; however, it also had its
drawbacks:

- All test code was visible in all other (downstream) projects, and that
  made it too easy to introduce unnecessary coupling. For example,
  this made it more difficult to migrate to JUnit Jupiter.

This commit addresses such issues by migrating to Gradle's first-class
support for "Java test fixtures".

- Having test fixture code in a dedicated source folder makes it
  readily apparent that the code is reused across the test suite.
- The build is now much cleaner since projects explicitly declare that
  they rely on specific test fixtures of upstream projects.
- Incremental builds are now much faster on average since downstream
  projects no longer have to be recompiled due to changes in tests in
  upstream projects.
- Prior to these commits we effectively had around 20 test fixture
  dependencies. With these commits we effectively now have only 7 test
  fixture dependencies (i.e., projects that share test fixtures).

Closes gh-23550
2020-01-02 16:01:56 +01:00
Sam Brannen d5f0bb23ae Disable publication of test fixture artifacts
Thanks to @melix for providing the code snippet necessary to achieve
this with Gradle 5.6.x.

See gh-23550
2020-01-02 16:01:35 +01:00
Sam Brannen c91dd02905 Delete obsolete TestSourcesPlugin
Since we have migrated to Gradle's built-in test fixture support, the
custom TestSourcesPlugin Gradle plugin is now obsolete.

See gh-23550
2020-01-02 16:01:35 +01:00