Commit Graph

12956 Commits

Author SHA1 Message Date
Rossen Stoyanchev 10c90a677c Move http.converter.reactive to http.codec 2016-07-22 14:14:46 -04:00
Arjen Poutsma b0d7625e3e Reactor StringEncoder into CharSequenceEncoder
This commit refactors the StringEncoder to a CharSequenceEncoder, in
order to support StringBuilders, Groovy GStrings, etc.

Issue: https://github.com/spring-projects/spring-reactive/issues/120
2016-07-22 12:47:46 -04:00
Rossen Stoyanchev 0f6505e32f Add timeout settings in SseIntegrationTests 2016-07-22 12:42:35 -04:00
Rossen Stoyanchev 101220bad1 Add ReactiveAdapterRegistry
Issue: SPR-14159
2016-07-22 12:21:28 -04:00
Brian Clozel 1a2ac8ea56 Reactor namespace change `io.projectreactor.ipc`
Some reactor modules such as reactor-netty were migrated under a new
namespace `io.projectreactor.ipc`.
2016-07-22 15:33:59 +02:00
Arjen Poutsma 436a98ec68 Polishing 2016-07-22 15:32:56 +02:00
Brian Clozel 78b6ba0569 Filter irrelevant nodes in StaxHandler tests 2016-07-21 23:01:55 +02:00
Marius Grama 3635c9dbfe Update xmlunit library to version 2.1.0
xmlunit 2.1.0 is the latest release for xmlunit.
Most of the xmlunit functionality used within spring-framework
was done through the xmlunit 1.x helper class
`org.custommonkey.xmlunit.XMLAssert`.

As of xmlunit 2.0.0 most of the XML comparison methods are done
through hamcrest matchers exposed by the xmlunit-matchers
library. In some cases during the migration, the matchers
had to be customized with custom `NodeMatcher` or
`DifferenceEvaluator` instances in order to keep the assertions
correct (they were performed with xmlunit 1.x previously).

Issue: SPR-14043
2016-07-21 15:04:21 +02:00
Sebastien Deleuze 9fb8a2eb2e Add contextClass resolution to JacksonJsonDecoder
Issue: SPR-14158
2016-07-21 14:57:50 +02:00
Juergen Hoeller 610bdf1cc3 DataSource adapters expose setCatalog/setSchema next to setUsername/setPassword
Issue: SPR-14501
2016-07-21 14:06:40 +02:00
Juergen Hoeller e756a5b54b ResourcePatternUtils.getResourcePatternResolver actually accepts null argument
Issue: SPR-14500
2016-07-21 14:06:30 +02:00
Sebastien Deleuze 74158af1b9 Add JsonView and type resolution support to JacksonJsonDecoder
There is no contextClass support yet, we need to find a way to pass
this information to the codecs.

Issue: SPR-14158
2016-07-21 13:55:59 +02:00
Sebastien Deleuze 903770f008 Add JsonView and type resolution support to JacksonJsonEncoder
Issue: SPR-14158
2016-07-21 13:19:52 +02:00
Brian Clozel 4d035e3ab1 Update Google Protobuf support to 3.0.0
This commit adds support for Google Protobuf 3.0.0 and make some changes
in the additional formats support:
* "com.googlecode.protobuf-java-format:protobuf-java-format" is no
longer required and its required version has been raised to 1.3+
(this lib adds support for JSON, XML, HTML formats)
* "com.google.protobuf:protobuf-java-util" is also now supported for
JSON format

Issue: SPR-13589
2016-07-21 11:38:56 +02:00
Arjen Poutsma 7b2196b408 Add writeAndFlushWith to ReactiveHttpOutputMessage
This commit changes the reactive flushing mechanism to use a newly
introduced writeAndFlushWith(Publisher<Publisher<DataBuffer>>) on
ReactiveHttpOutputMessage instead of using the FlushingDataBuffer.

Issue: https://github.com/spring-projects/spring-reactive/issues/125
2016-07-21 11:08:54 +02:00
Juergen Hoeller 9cc625ee2c Polishing
(cherry picked from commit 5a92aa4)
2016-07-20 23:25:17 +02:00
Juergen Hoeller 28e7c11234 Polishing 2016-07-20 22:41:56 +02:00
Juergen Hoeller 5c72ea915d Upgrade to Jackson 2.8.1 2016-07-20 22:36:22 +02:00
Juergen Hoeller 725fb3219f Polishing 2016-07-20 18:06:31 +02:00
Juergen Hoeller 0e3f0bd9d0 Avoid JDK proxy against CGLIB Factory interface and assert required type when resolving dependency
Issue: SPR-14478
2016-07-20 18:05:51 +02:00
Juergen Hoeller 938b56c0fe BeanWrapperImpl.setBeanInstance correctly exposes root object
Issue: SPR-14474
2016-07-20 18:02:23 +02:00
Sebastien Deleuze 3a4e5d5da8 Fix ParameterizedType + contextClass support in Jackson converter
Issue: SPR-14470
2016-07-20 09:29:23 +02:00
Rossen Stoyanchev b52b56c94e Update to the latest Reactory Netty snapshot 2016-07-19 21:11:07 -04:00
Juergen Hoeller 99be15f58b Revise encoding steps towards use of JDK Charset and StandardCharsets
Issue: SPR-14492
2016-07-19 23:43:06 +02:00
Juergen Hoeller 79d30d8c8a Polishing 2016-07-19 23:42:32 +02:00
Juergen Hoeller adc595b5f1 Avoid dependency on WebUtils for extracting file extension
Issue: SPR-14479
2016-07-19 23:30:33 +02:00
Rossen Stoyanchev 86c659f5c0 Remove isAsyncStarted assertion
Issue: SPR-14444
2016-07-19 16:43:03 -04:00
Juergen Hoeller a4743c07d4 Polishing 2016-07-19 20:09:00 +02:00
Juergen Hoeller fd4b5ac892 Ignore JRuby template tests (not compatible with JDK 9 yet)
Issue: SPR-13344
2016-07-19 19:42:31 +02:00
Juergen Hoeller 88fcd0a2ed Framework build compatible with JDK 9 (tests running against java.base module)
Issue: SPR-13344
2016-07-19 19:37:34 +02:00
Juergen Hoeller d07381e862 Avoid deprecated number constructors on JDK 9
Issue: SPR-13344
2016-07-19 19:25:55 +02:00
Juergen Hoeller 8580483d72 SerializableTypeWrapper reobtains type accessors from declaring interface
Issue: SPR-14487
2016-07-19 19:22:32 +02:00
Juergen Hoeller aaac199e8b Consistently use constructor-based instantiation instead of Class.newInstance / BeanUtils.instantiate
Issue: SPR-14486
2016-07-19 19:21:06 +02:00
Juergen Hoeller b3253ca5e2 Drop mock.staticmock package from spring-aspects
Issue: SPR-14485
2016-07-19 18:56:06 +02:00
Juergen Hoeller 8bb34bc962 Resource.isFile() and JAF MediaTypeFactory
Issue: SPR-14484
2016-07-19 18:53:31 +02:00
Juergen Hoeller 7287baefeb GenericSqlQuery configured with RowMapper instance
Issue: SPR-14489
2016-07-19 18:44:06 +02:00
Juergen Hoeller aae4874b85 Revised spring-orm test suite (no AbstractJpaTests anymore)
Issue: SPR-13515
2016-07-19 17:50:57 +02:00
Juergen Hoeller 91ac0bfefa Reinstated support for spring-beans.dtd (streamlined like xsd)
Issue: SPR-13499
2016-07-19 17:46:17 +02:00
Juergen Hoeller 5ea8c2670e Reinstated tests for implicit aliases
Issue: SPR-14437
2016-07-19 17:26:47 +02:00
Juergen Hoeller 1670b4e154 Reliably pass CurrentTenantIdentifierResolver to SessionFactory
Issue: SPR-14476
2016-07-19 17:25:07 +02:00
Arjen Poutsma 35ce1945e0 Improved DataBufferUtilsTest 2016-07-19 11:11:11 +02:00
Rossen Stoyanchev 4b92bf2af1 Split HttpMessageConverter into ~Reader and ~Writer 2016-07-18 22:16:35 -04:00
Brian Clozel dca80788d4 Fix default origin port in ReactorClientHttpConnector
This commit ensures that a valid port is given to the underlying Netty
client when no port is defined in the URL itself.

By default, port 80 is used by the Reactor Netty client.

Issue: SPR-14477
2016-07-18 21:53:15 +02:00
Rossen Stoyanchev 3e096ce810 Improve javadoc on reactive classes
Ensure type-level Javadoc in every class, comply with guidelines for
80 char on Javadoc, and minor polish.
2016-07-18 14:59:15 -04:00
Brian Clozel 7a0c2422c6 Add client-side exception hierarchy
The `WebClient` has a new exception hierarchy:

* `WebClientException` is the root of all exceptions thrown by the
`WebClient`
* `WebClientResponseException` are all exceptions associated with
specific HTTP response status codes
* `WebClientErrorException` and `WebServerErrorException` are
respectively for 4xx and 5xx HTTP status codes

`ResponseExtractor` implementations are adapted to optionally throw
exceptions if it's impossible to extract the relevant parts of the
response (e.g. extracting the response body if the response is a 404).

This commit also introduces `ResponseErrorHandler`s that take care of
the whole exception mapping infrastructure. Since
`WebClientResponseException`s provide the status, headers and response
body, we also need a dedicated mechanism to extract information from the
response body at that level.

The `BodyExtractors` are responsible for extracting that information
from the exception, given they are provided with all the information
they need; in that case, message decoders are required.

To convey all this new information downstream, the `WebClient` now wraps
the message converters and response error handler instances into a
dedicated `WebClientConfig` object.
2016-07-18 17:33:15 +02:00
Brian Clozel fe79219607 Reorganize spring-web-reactive .gitignore 2016-07-18 17:31:18 +02:00
Arjen Poutsma 041437f3ee Fixed DataBufferUtilsTest on Windows
DataBufferUtilsTests checked for newline characters before, resulting in
failures on Windows.
2016-07-18 17:08:46 +02:00
Stephane Nicoll 03e6eeeadc Fix EJB dependency upgrade 2016-07-18 14:51:03 +02:00
Stephane Nicoll cd6b5f9be0 Fix EJB API coordinates 2016-07-18 13:35:08 +02:00
Stephane Nicoll 53a7027d8b Upgrade to EJB 3.2 2016-07-18 13:21:22 +02:00