Commit Graph

14693 Commits

Author SHA1 Message Date
Arjen Poutsma
f0f3df5cc0 Use PathPattern in PathResourceLookupFunction 2017-05-10 10:12:55 +02:00
Arjen Poutsma
64c0ec3d5e Add test for combining @Controller with RouterFunctions
This commit adds a test for combining RouterFunctions with a
@Controller.

Issue: SPR-15521
2017-05-09 16:38:30 +02:00
Juergen Hoeller
9273197f11 Latest dependency updates (Common Annotations 1.3, Caffeine 2.5, Selenium 3.4, JSONassert 1.5) 2017-05-09 13:48:05 +02:00
Arjen Poutsma
b649041976 Add ServerHttpResponse.addCookie method
This commit adds a `addCookie(ResponseCookie)` method to the reactive
`ServerHttpResponse` interface.

Issue: SPR-15523
2017-05-09 10:18:39 +02:00
Rossen Stoyanchev
add1305252 Re-add vararg options in WebHttpHandlerBuilder
WebHttpHandlerBuilder is low level not expected to appear frequently
but they might be repeated more in tests (e.g. of WebFilter's).

Issuse: SPR-15499
2017-05-08 15:50:27 -04:00
Rossen Stoyanchev
459457e1aa WebFilterChain delegation nested in Mono.defer()
Issue: SPR-15520
2017-05-08 15:36:31 -04:00
Rossen Stoyanchev
47d6e4a332 Immutable DefaultWebFilterChain
Issue: SPR-15517
2017-05-08 15:04:38 -04:00
Juergen Hoeller
5497416c2d Polishing 2017-05-08 09:10:36 +02:00
Juergen Hoeller
f25c6ba9bc Polishing 2017-05-07 22:59:25 +02:00
Juergen Hoeller
c735eec08b Merge pull request #1421 from kazuki43zoo/patch-javadoc
Fix javadoc of AbstractHandlerMapping#setPathMatcher
2017-05-07 22:58:04 +02:00
Kazuki Shimizu
df793392fd Fix javadoc of AbstractHandlerMapping#setPathMatcher 2017-05-08 05:52:15 +09:00
Juergen Hoeller
92f18a4985 HandlerExecutionChain.toString() includes reliable interceptor number
Issue: SPR-15525
2017-05-07 21:05:16 +02:00
Juergen Hoeller
25aef4d3cc ResponseStatusException reason is optional (with lazily constructed message)
Issue: SPR-15524
2017-05-06 12:53:03 +02:00
Juergen Hoeller
edbf9fa74e Upgrade to Kotlin 1.1.2-3
Also removes JDK 9 build support for the time being since Gradle 3.5 still doesn't run on JDK 9.
2017-05-05 23:55:18 +02:00
Juergen Hoeller
39f8bd663e Polishing 2017-05-05 23:19:08 +02:00
Juergen Hoeller
4fdd85324d Aligned exception handling in Jackson and JAXB codecs
Issue: SPR-15516
2017-05-05 23:19:01 +02:00
Rossen Stoyanchev
1c4babd410 Fix minor issue in ExchangeResult 2017-05-05 16:14:03 -04:00
Rossen Stoyanchev
0d28a1c32b Polish 2017-05-05 15:02:09 -04:00
Rossen Stoyanchev
4d962a1793 Remove HttpStatus from HttpMessageConversionException
HttpMessageConverter's are client and server and arguably shouldn't
contain a server-side concept such a response status.

The status field is recent, it was added to differentiate 400 vs 500
errors with Jackson 2.9+ but there is no need for it since the same
distinction is reflected in raising an HttpMessageNotReadableException
vs a general HttpMessageConversionException.

Issue: SPR-15516
2017-05-05 14:44:08 -04:00
Rossen Stoyanchev
83e0e1604a Refine encoding/decoding exception handling
Starting with removing a package cycle on the use of
ResponseStatusException in the codec package, this commit generally
refines codec exception handling.

The new [Encoding|Decoding]Exception mirror the existing
HttpMessageNot[Readable|Writable]Exception and are used similarly
especially to differentiate betwen 400 and 500 errors when parsing
server request body content.

The commit also aligns some of the exception handling of JSON and XML
on the WebFlux side with that on the Spring MVC side.

Issue: SPR-15516
2017-05-05 14:29:43 -04:00
Rossen Stoyanchev
d7e54cea84 Test commit 2017-05-05 09:41:54 -04:00
Juergen Hoeller
ba501791c9 Consistent use of WebFlux terminology over Web Reactive 2017-05-05 14:21:01 +02:00
Juergen Hoeller
429d6ac67d Defensive handling of test timeouts with RxNetty and Reactor 2017-05-05 14:19:50 +02:00
Juergen Hoeller
1083fe6f3f Upgrade to RxJava 1.3
Issue: SPR-15497
2017-05-05 12:13:37 +02:00
Rossen Stoyanchev
8231812a3c Jackson Encoder/Decoder accept custom MimeType's
Issue: SPR-15474
2017-05-04 18:05:55 -04:00
Rossen Stoyanchev
afa1c93585 Fix error in mock server test code 2017-05-04 17:24:46 -04:00
Juergen Hoeller
652266bcc2 Polishing 2017-05-04 22:27:36 +02:00
Rossen Stoyanchev
75117f42b8 Use the configured charset for part headers
This comment extends the use of the charset property in
FormHttpMessageConverter to also include multipart headers with a
default of UTF-8.

We now also set the charset parameter of the "Content-Type" header to
indicate to the server side how to decode correctly.

Issue: SPR-15205
2017-05-04 15:59:54 -04:00
Rossen Stoyanchev
bda2723933 Correct charset determination in Synchronoss reader 2017-05-04 13:30:56 -04:00
Rossen Stoyanchev
bb744574e5 Remove optional javax.mail dependency from WebFlux
The MultipartHttpMessageWriter now directly encodes part header values
defaulting to UTF-8 and also specifies the charset in the
Content-Type header for the entire request.

This should work with something commonly used like Apache Commons
FileUpload which checks request.getCharacterEncoding() and uses it
for reading headers.
2017-05-04 13:12:44 -04:00
Rossen Stoyanchev
a56f735edd Polish 2017-05-04 12:25:19 -04:00
Rossen Stoyanchev
ac1db169a4 Drop "get" prefix from Part accessor methods 2017-05-04 10:13:16 -04:00
Arjen Poutsma
4525c6a537 Add support for Flux<Part> in BodyExtractors
This commit adds a `toParts` method in `BodyExtractors`, returning a
BodyExtractor<Part>.
2017-05-04 12:39:51 +02:00
Juergen Hoeller
1f5eaf20b0 Basic test for functional bean registration within a configuration class
Issue: SPR-13779
2017-05-04 11:26:21 +02:00
Juergen Hoeller
de35ff1198 Latest dependency updates (Quartz 2.3, Protobuf 3.3, Jetty 9.4.5, Undertow 1.4.14) 2017-05-04 11:24:58 +02:00
Stephane Nicoll
3a5e06401d Upgrade to Reactor Bismuth.M1 2017-05-04 10:51:20 +02:00
Stephane Nicoll
07c9c4ddf9 Merge pull request #1409 from eddumelendez:netty_bom
* pr/1409:
  Simplify Netty dependency management by importing its bom
2017-05-04 10:49:28 +02:00
Eddú Meléndez
204ec6bf92 Simplify Netty dependency management by importing its bom
Closes gh-1409
2017-05-04 10:49:08 +02:00
Rossen Stoyanchev
6f3051c677 Support for @RequestPart with reactive type wrapper
Issue: SPR-14546
2017-05-03 23:03:47 -04:00
Rossen Stoyanchev
fc7bededd0 Support data binding for multipart requests in WebFlux
Issue: SPR-14546
2017-05-03 22:36:04 -04:00
Rossen Stoyanchev
b5089ac092 Support @RequestBody Flux<Part> in WebFlux
This commit turns the Synchronoss NIO Multipart HttpMessageReader into
a reader of Flux<Part> and creates a separate reader that aggregates
the parts into a MultiValueMap<String, Part>.

Issue: SPR-14546
2017-05-03 18:46:41 -04:00
Juergen Hoeller
d43dfc7bae Properly extract jar file from Tomcat war URL
Issue: SPR-15485
2017-05-03 21:58:59 +02:00
Juergen Hoeller
4d86515fa5 Overridable Commons Logging bridge in separate spring-jcl jar
Issue: SPR-14512
2017-05-03 20:29:05 +02:00
Arjen Poutsma
cf7dfc7b17 Properly close channel in SynchronossPart
This commit properly closes the opened channels in the SynchronossPart,
and also makes sure that the entire contents is copied, not just the
first batch.
2017-05-03 14:51:22 +02:00
Juergen Hoeller
27057889f8 Polishing 2017-05-03 13:45:29 +02:00
Juergen Hoeller
d74542ed21 Honor @Autowired(required=false) at parameter level
Includes a revision of the AutowireCandidateResolver SPI with default methods.

Issue: SPR-15268
2017-05-03 13:42:16 +02:00
Phillip Webb
07ef7a97c7 Cache SpringFactoriesLoader loads
Update `SpringFactoriesLoader` to cache property file loads. This helps
reduce the number of garbage objects created as each load uses an 8K
char buffer.

Issue: SPR-15509
2017-05-03 12:51:52 +02:00
Arjen Poutsma
ed4bd43cac Add writableChannel to WritableResource
This commit introduces a `writableChannel()` method to
`WritableResource`, defaulting to `Channels.newChannel`, but with
overrides for file-based resources.
2017-05-03 11:44:01 +02:00
Juergen Hoeller
9d8e9cf243 Common root cause introspection algorithm in NestedExceptionUtils
Issue: SPR-15510
2017-05-03 11:31:28 +02:00
Rossen Stoyanchev
16901b1497 Add bindToHttpHandler to WebTestClient
Issue: SPR-15499
2017-05-02 18:13:27 -04:00