Commit Graph

13587 Commits

Author SHA1 Message Date
Sebastien Deleuze 8d26c738a0 Polishing
This commit polishes previous one by also accepting
generic types explicitly declared with a class that
extends DataBuffer allowing to write Flux<DefaultDataBuffer>
for example.

Issue: SPR-14952
2016-11-25 10:33:13 +01:00
Daniel Fernández a98be035a3 Make the signature of RHOM#writeAndFlush() more flexible
This modifies the signature of
ReactiveHttpOutputMessage#writeAndFlush(...) in order to
be able to use Flux<Flux<DataBuffer>> objects as arguments of
this method.

Issue: SPR-14952
2016-11-25 09:59:33 +01:00
Sebastien Deleuze a143b57d4b Polish Kotlin nullable support
This commit polishes Kotlin nullable support by reusing
MethodParameter#isOptional() instead of adding a new
MethodParameter#isNullable() method, adds
Kotlin tests and introduces Spring Web Reactive
support.

Issue: SPR-14165
2016-11-24 18:28:50 +01:00
Raman Gupta fada91e538 Treat Kotlin nullable as non-required
Where `isOptional` is used, also check for `isNullable` i.e.
values are not considered required if they are Kotlin nullables:
- spring-messaging: named value method arguments
- spring-web: named value method arguments
- spring-webmvc: request parts

This means that Kotlin client code no longer has to explicity specify
"required=false" for Kotlin nullables -- this information is inferred
automatically by the framework.

Issue: SPR-14165
2016-11-24 17:18:55 +01:00
Arjen Poutsma 735e288d46 Add DataBuffer BodyInserter/BodyExtractor
Added a BodyExtractor for Flux<DataBuffer>, and a BodyInserter for
Publisher<DataBuffer>

Issue: SPR-14918
2016-11-24 17:04:50 +01:00
Juergen Hoeller b22a59a0c4 Polishing 2016-11-24 15:32:06 +01:00
Juergen Hoeller 0b71e3640b Avoid defensive check for Servlet 3.1 setContentLengthLong method
Issue: SPR-14467
2016-11-24 15:30:10 +01:00
Juergen Hoeller 80931b211c Shared DefaultConversionService instance for simple fallback purposes
Issue: SPR-14948
2016-11-24 15:29:17 +01:00
Arjen Poutsma 34c6c9ffc2 Merge pull request #1243 from violetagg/write-issue
* SPR-14941:
  Fix NPE in ServletServerHttpResponse.ResponseBodyProcessor.write
2016-11-24 11:55:34 +01:00
Violeta Georgieva 6f222609c2 Fix NPE in ServletServerHttpResponse.ResponseBodyProcessor.write
Issue: SPR-14941
2016-11-24 11:53:28 +01:00
Juergen Hoeller 14eba5034d Consistent ExpressionException-style quoting of expression string and position
Issue: SPR-14942
2016-11-24 11:08:55 +01:00
Brian Clozel b10045dc0e Do not execute ResourceUrlEncodingFilter only once per request
In case the filter is also registered to the ERROR dispatcher, the
following happens:
* the filter is executed once for the regular execution
* the filter should be executed a second time when dispatched to error

Since the filter is a `OncePerRequestFilter`, the filter is only
executed once and won't be executed when handling the error.

This can lead to situations like spring-projects/spring-boot#7348

This commit makes this filter a simple `GenericFilterBean`.

Issue: SPR-14891
2016-11-24 09:56:33 +01:00
Rossen Stoyanchev 9bcc7c3b06 Remove ResourceServlet (deprecated in 4.3) 2016-11-23 21:24:07 -05:00
Rossen Stoyanchev d201a222b8 Avoid locking in WebSocket session "close" callback
When processing a "close" notification from the server make an effort
to cancel any outstanding heartbeat but avoid going as far as acquiring
the responseLock since the server itself may already hold a lock of its
own leading to a potential deadlock.

The heartbeat task is now also further protected with an isClosed()
check in case the heartbeat does not get cancelled in a concurrent
scenario.

Issue: SPR-14917
2016-11-23 20:49:24 -05:00
Rossen Stoyanchev 3eb2432ced Fix TODO in ReactorHttpServer 2016-11-23 15:47:19 -05:00
Juergen Hoeller 1f4c6de287 Polishing 2016-11-23 21:10:01 +01:00
Juergen Hoeller 200fa5ed67 Latest dependency updates (Hibernate Validator 5.3.3, RxJava 1.2.3, Undertow 1.4.6) 2016-11-23 21:09:20 +01:00
Rossen Stoyanchev 82ad86c9d3 Merge pull request #1239 from smaldini/reactor-netty-0-6 2016-11-23 13:21:30 -05:00
Rossen Stoyanchev 6b9b47ee13 Polish 2016-11-23 13:20:38 -05:00
Stephane Maldini 85a4e5065d Add log4j2 config to spring-web-reactiv 2016-11-23 13:16:54 -05:00
Stephane Maldini 099f5a254e Upgrade to reactor-netty/-ipc to 0.6 snapshots 2016-11-23 12:50:01 -05:00
Stephane Nicoll 57130b2d10 Upgrade to Gradle 3.2.1
Issue: SPR-14906
2016-11-23 16:53:57 +01:00
Juergen Hoeller b3e94dc747 PathMatchingResourcePatternResolver tries all root URLs (any file extension) as jar file
Issue: SPR-14936
2016-11-23 14:01:37 +01:00
Juergen Hoeller 89802cfc11 TypeDescriptor avoids merged annotations for equality comparisons
Issue: SPR-14926
Issue: SPR-14929
2016-11-23 12:25:01 +01:00
Rossen Stoyanchev 637b6387ea Starting point for reactive WebSocket support
Includes basic abstractions and an RxNetty support to start.

Issue: SPR-14527
2016-11-22 16:24:02 -05:00
Juergen Hoeller 8662b7773c PathMatchingResourcePatternResolver converts manifest entries to absolute paths
Issue: SPR-14934
2016-11-22 16:05:30 +01:00
Juergen Hoeller 96bfc14dba No warn logging for propagated original exception
Issue: SPR-14907
2016-11-22 16:00:23 +01:00
Juergen Hoeller 9bf4d7cf4e Polishing 2016-11-22 14:57:00 +01:00
Juergen Hoeller 85b0ce1ef7 Avoid defensive checks against java.time API
Issue: SPR-13188
2016-11-22 14:55:03 +01:00
Juergen Hoeller a0fee4657d JdbcUtils explicitly extracts SQL date/time for JSR-310 LocalDate/Time
Issue: SPR-14898
2016-11-22 14:52:21 +01:00
Juergen Hoeller 3b49aacb9f Merge pull request #1241 from dreis2211/registry-user-count
Implement allocation-friendly method to get user count in SimpUserRegistry
2016-11-21 21:14:42 +01:00
Christoph Dreis a929e9ccaa Implement allocation-friendly method to get user count in SimpUserRegistry
SPR-14930
2016-11-21 21:02:10 +01:00
Juergen Hoeller da63898d5f Polishing 2016-11-21 17:36:04 +01:00
Juergen Hoeller a49809b1a4 WebSocketServerSockJsSession uses dedicated disconnect lock
Issue: SPR-14917
2016-11-21 17:24:44 +01:00
Juergen Hoeller 94fd4a696f Downgrade to Jetty 9.4 RC1 (since RC2 has broken HEAD handling) 2016-11-21 17:20:55 +01:00
Juergen Hoeller fe7f4db2ae Latest dependency updates (Jackson 2.8.5, Joda-Time 2.9.6, Jetty 9.4 RC2, RxNetty 0.5.2 RC5) 2016-11-21 10:13:20 +01:00
Arjen Poutsma dbe81bef52 Add PATCH method operation to RestTemplate
This commit adds a HTTP PATCH operation to the RestTemplate:
patchForObject. As with most operations, there are three variants:
varargs, Map, and URI based.

Issue: SPR-14857
2016-11-17 10:19:09 +01:00
Stephane Nicoll f0ceefba0e Polish doc 2016-11-17 07:25:11 +09:00
Rossen Stoyanchev a224874b43 Improve resolution of multi-value async model attrs
Multi-value async attributes like Flux and Observable in the model
are treated with Collection semantics and resolved to Mono<List<?>>
prior to rendering.
2016-11-16 14:18:09 -05:00
Brian Clozel bb702ee9c0 Gradle plugins: update sonarqube and remove protobuf
Since https://jira.sonarsource.com/browse/SONARGRADL-30, we can now
safely update to sonarqube plugin v2.2.1.

The protobuf gradle plugin is now deprecated - instead of configuring
the new plugin supported by Google, this commits drops that part of the
gradle build since that proto->java conversion is rarely needed and can
be manually run by any member of the team.
2016-11-16 14:06:59 +01:00
Brian Clozel cb44f2746e Prevent resource transformation of gzipped CSS files
When resolved through the `GzipResourceResolver`, CSS files can be
resolved as their pre-gzipped variant, if a ".gz" file is present in the
configured resource locations.

Such resources are gzipped and thus should not be transformed by
`CssLinkResourceTransformer`s, since rewriting those would need to
uncompress/transform/recompress. This would lead to poorer performances
than resolving plain resources and delegating compression to the
container.

This commit checks for `GzippedResource` instances in
`CssLinkResourceTransformer` and avoids processing them.

Issue: SPR-14773
2016-11-16 10:26:09 +01:00
Juergen Hoeller a4f1842738 Latest dependency updates (Hibernate Validator 5.3.2, Caffeine 2.3.5, RxJava 2.0.1, Tomcat 8.5.8) 2016-11-14 18:21:54 +01:00
Arjen Poutsma 6de062d198 Fix RouterFunction.andRoute()
Fixed RouterFunction.andRoute signature.

Issue: SPR-14904
2016-11-14 17:17:05 +01:00
Mark Paluch 6261106a93 Fix TLS detection in URLs for Netty Client RequestFactory
Do not check on non-specified port when scheme is https.
Enables SSL for https URIs with a specified port.

Issue: SPR-14889
2016-11-11 16:39:18 +01:00
Juergen Hoeller 3a29daac45 ASM-generated class names get interned for better memory allocation
Issue: SPR-14886
2016-11-08 17:38:57 +01:00
Juergen Hoeller dc8cd4e4c0 Polishing
Issue: SPR-14888
2016-11-08 17:26:59 +01:00
Juergen Hoeller 55afb59c7a Merge pull request #1233 from kazuki43zoo/SPR-14888
Detect invalid configuration for autoGrowCollectionLimit on DataBinder
2016-11-08 17:17:47 +01:00
Kazuki Shimizu 124f2128fa Detect invalid configuration for autoGrowCollectionLimit on DataBinder
Issue: SPR-14888
2016-11-09 01:00:27 +09:00
Juergen Hoeller dda9762072 Moved WebExchangeDataBinder to web.bind.support (alongside WebRequestDataBinder)
Issue: SPR-14542
2016-11-08 11:01:58 +01:00
Juergen Hoeller f0be79e0a1 Promoted BindingContext to web.reactive root (since HandlerResult requires it there)
Issue: SPR-14542
2016-11-08 09:33:49 +01:00