Commit Graph

20170 Commits

Author SHA1 Message Date
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
Sam Brannen
7b6d83a106 Use Gradle test fixture support for spring-web
See gh-23550
2020-01-02 16:01:35 +01:00
Sam Brannen
8a371c7669 Use Gradle test fixture support for spring-aop
See gh-23550
2020-01-02 16:01:35 +01:00
Sam Brannen
5581f3b77b Use Gradle test fixture support for spring-tx
See gh-23550
2020-01-02 16:01:35 +01:00
Sam Brannen
57b771ba92 Move common FactoryMethods to spring-beans test fixtures
See gh-23550
2020-01-02 16:01:35 +01:00
Sam Brannen
94f8ef08e2 Move common TestPrincipal to spring-core test fixtures
See gh-23550
2020-01-02 16:01:35 +01:00
Sam Brannen
726b1bb1d0 Rename test fixture package in spring-context
See gh-23550
2020-01-02 16:01:35 +01:00
Sam Brannen
7cd4ddf5fc Rename test fixture package in spring-beans
See gh-23550
2020-01-02 16:01:35 +01:00
Sam Brannen
4260c34b47 Rename test fixture package in spring-core
See gh-23550
2020-01-02 16:01:34 +01:00
Sam Brannen
0335db23c9 Use Gradle test fixture support for spring-context-support
See gh-23550
2020-01-02 16:01:34 +01:00
Sam Brannen
61d4ee594d Use Gradle test fixture support for spring-beans and spring-context
See gh-23550
2020-01-02 16:01:34 +01:00
Sam Brannen
5718bf424b Use Gradle test fixture support for spring-core
See gh-23550
2020-01-02 16:01:34 +01:00
Brian Clozel
75fd391fc7 Remove quality parameter from selected media type
Prior to this commit, WebFlux application would keep the quality
parameter from the "Accept" request header when selecting a media type
for the response. It would then echo it back to the client.

While strictly not wrong, this is unnecessary and can confuse HTTP
clients. This commit aligns WebFlux's behavior with Spring MVC.

Fixes gh-24239
2020-01-02 11:29:04 +01:00
Honnix
8082b338e2 Document that SpEL supports symbolic logical operators
Make it clear that symbolic logical operators are supported.

Closes gh-24276
2019-12-31 18:58:48 +01:00
Rossen Stoyanchev
956ffe6858 ContentDisposition refactoring
See gh-24220
2019-12-26 17:30:15 +00:00
Stephane Nicoll
3cf806a668 Merge pull request #24266 from PascalSchumacher
* pr/24266:
  Add missing space in AopConfigException message

Closes gh-24266
2019-12-26 09:55:41 +01:00
Pascal Schumacher
e7d489667c Add missing space in AopConfigException message
See gh-24266
2019-12-26 09:52:54 +01:00
Stephane Nicoll
9c17eb59a4 Merge pull request #24252 from ghale
* pr/24252:
  Upgrade to Gradle build scan plugin 3.1.1

Closes gh-24252
2019-12-23 17:16:58 +01:00
Gary Hale
2d779857aa Upgrade to Gradle build scan plugin 3.1.1
See gh-24252
2019-12-23 17:09:48 +01:00
Stephane Nicoll
9c2d146a51 Merge pull request #24251 from ghale
* pr/24251:
  Upgrade to nohttp plugin 0.0.4.RELEASE

Closes gh-24251
2019-12-23 16:47:45 +01:00
Gary Hale
b6b7162d61 Upgrade to nohttp plugin 0.0.4.RELEASE
See gh-24251
2019-12-23 16:46:35 +01:00
Ferdinand Jacobs
0b5ad09394 Fix example in RSocket docs
Closes gh-24245
2019-12-22 16:48:58 +01:00
Sam Brannen
1b4fd1cba1 Polishing 2019-12-22 16:00:45 +01:00
Rossen Stoyanchev
261956fd08 Improve UriBuilder Javadoc on query params
Add a note on encoding for query parameters specifically mentioning the
"+" sign and a link to the reference docs.

Also remove duplicate Javadoc in UriComponentsBuilder which is already
inherited from UriBuilder.
2019-12-20 11:03:08 +00:00
Rossen Stoyanchev
a1b8b18282 Polishing logPrefix Javadoc in ClientRequest|Response
Closes gh-23791
2019-12-20 09:27:40 +00:00
Rossen Stoyanchev
7456fb9c65 Add failing test to be fixed
See gh-23791
2019-12-20 09:15:44 +00:00
Rossen Stoyanchev
ea4f1ca5d5 Update ContentDisposition to RFC 6266
Close gh-24231
2019-12-19 16:27:40 +00:00
Rossen Stoyanchev
15321a3163 Fix checkstyle violations 2019-12-19 13:06:53 +00:00
Rossen Stoyanchev
41f40c6c22 Escape quotes in filename
Closes gh-24220
2019-12-19 12:23:12 +00:00
Rossen Stoyanchev
44da775134 CorsInterceptor skips async dispatch
Closes gh-24223
2019-12-18 16:48:49 +00:00
Rossen Stoyanchev
0eacb443b0 Reuse InputStream in ResourceRegionHttpMessageConverter
The converter now tries to keep reading from the same InputStream which
should be possible with ordered and non-overlapping regions. When
necessary the InputStream is re-opened.

Closes gh-24214
2019-12-18 16:22:53 +00:00
Juergen Hoeller
7474ee7041 Polishing 2019-12-16 16:50:30 +01:00
Juergen Hoeller
0711e58a5f Un-deprecate PathResource (for NIO Path resolution in createRelative)
Includes aligned createRelative signature and dedicated java.io.File test.

Closes gh-24211
2019-12-16 16:50:04 +01:00
Juergen Hoeller
f353bc0c25 ConcurrentReferenceHashMap cache for getInterfaceMethodIfPossible results
Closes gh-24206
2019-12-16 16:49:39 +01:00