Commit Graph

1949 Commits

Author SHA1 Message Date
Sam Brannen
cb1b178405 Ensure Reactor & RxJava response extractors compile with Eclipse JDT 2016-07-23 17:15:18 +02:00
Brian Clozel
b2e848737c Rename reactor.io.netty -> reactor.ipc.netty 2016-07-23 14:34:12 +02:00
Juergen Hoeller
e59a5993f3 Consistent support for multiple Accept headers
Issue: SPR-14506
2016-07-22 22:27:58 +02:00
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
Arjen Poutsma
436a98ec68 Polishing 2016-07-22 15:32:56 +02:00
Sebastien Deleuze
9fb8a2eb2e Add contextClass resolution to JacksonJsonDecoder
Issue: SPR-14158
2016-07-21 14:57:50 +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
28e7c11234 Polishing 2016-07-20 22:41:56 +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
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
8bb34bc962 Resource.isFile() and JAF MediaTypeFactory
Issue: SPR-14484
2016-07-19 18:53:31 +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
Rossen Stoyanchev
028be2a298 Switch to Reactor 3 snapshots and Netty 4.1.3 2016-07-15 17:16:26 -04:00
Juergen Hoeller
dc1664939c Javadoc fixes and pruning of outdated references 2016-07-15 22:12:11 +02:00
Juergen Hoeller
f0c397e4e2 Comprehensive Servlet 3.1 support in spring-web and spring-test
Issue: SPR-14467
2016-07-15 22:11:14 +02:00
Sam Brannen
3f317b7d3f Clean up warnings in spring-web 2016-07-15 18:38:27 +02:00
Sam Brannen
58804da369 Polish Reactor & RxJava response extractors 2016-07-15 17:54:24 +02:00
Sam Brannen
1731460eac Ensure Reactor & RxJava response extractors compile with Eclipse JDT 2016-07-15 17:53:15 +02:00
Rossen Stoyanchev
d2e105f28d Add @Since 5.0 and package-info for reactive classes 2016-07-14 17:40:17 -04:00
fisache
9aa35a8b5f Polish doc
Closes gh-1108
2016-07-14 19:15:38 +02:00
Arjen Poutsma
3e47fccf2b Propagate IOExceptions in Servlet bridge 2016-07-14 12:30:35 -04:00
Arjen Poutsma
4390cd0c2b Fixed Jaxb2CollectionHttpMessageConverterTests
- Added Woodstox before Aalto in the spring-web build, so that Woodstox
   is used as StAX implementation, and not the less featured Aalto.
 - Hardcoded Aalto dependency in XmlEventDecoder, instead of relying on
   the StAX XMLInputFactory.
2016-07-14 12:30:35 -04:00
Rossen Stoyanchev
5d1b542698 Move spring-web-reactive classes to spring-web 2016-07-14 12:30:35 -04:00
Juergen Hoeller
84afc601b8 Configurable UrlPathHelper in PathExtensionContentNegotiationStrategy
This commit also aligns ResourceUrlProvider's and RequestMappingInfo's UrlPathHelper setter/getter signatures.

Issue: SPR-14454
2016-07-13 15:14:42 +02:00
Juergen Hoeller
a1f5fb53db Java 8 getParameterCount() instead of getParameterTypes().length
Issue: SPR-13188
2016-07-07 01:04:24 +02:00
Juergen Hoeller
da9c24c41e Polishing 2016-07-06 18:11:33 +02:00
Juergen Hoeller
102dc8a4dd Polishing 2016-07-06 15:29:15 +02:00
Stephane Nicoll
e4b0486c5a Add @FunctionalInterface on candidate interfaces
Issue: SPR-14432
2016-07-06 14:32:13 +02:00
Stephane Nicoll
00d2606b00 Explicit type can be replaced by <>
Issue: SPR-13188
2016-07-05 17:00:34 +02:00
Juergen Hoeller
b5db5d3aac Broadly remove deprecated core classes and methods
Issue: SPR-14430
2016-07-05 15:52:49 +02:00
Juergen Hoeller
0fc0ce78ae Drop deprecated dependencies on Log4j, JRuby, JExcel, Burlap, Commons Pool/DBCP
This commit also removes outdated support classes for Oracle, GlassFish, JBoss.

Issue: SPR-14429
2016-07-05 15:46:53 +02:00
Juergen Hoeller
51252ebbca Avoid defensive checks against Java 8 API (java.util.Optional etc)
This commit also fixes broken javadoc links and code references.

Issue: SPR-13188
2016-07-05 02:09:00 +02:00
Juergen Hoeller
2b3445df81 Drop Portlet MVC support
This commit also removes the corresponding deprecated Servlet MVC variant and updates DispatcherServlet.properties to point to RequestMappingHandlerMapping/Adapter by default.

Issue: SPR-14129
2016-07-04 23:33:47 +02:00
Juergen Hoeller
ae0b7c26c5 Drop Servlet 2.5 runtime compatibility
Issue: SPR-13189
2016-07-04 23:31:21 +02:00
Juergen Hoeller
ccf791b63f Deprecate OkHttp 2.x support
Issue: SPR-14344
2016-07-04 23:23:28 +02:00
Juergen Hoeller
447835465f Remove support for deprecated AbstractHttpClient class
Issue: SPR-14422
2016-07-04 23:21:42 +02:00
Stephane Nicoll
037746da44 Polish
Closes gh-1097
2016-07-01 14:26:48 +02:00
Juergen Hoeller
1c73664c40 Defensively access deprecated AbstractHttpClient class from Apache HttpComponents
Issue: SPR-14422
2016-07-01 14:11:26 +02:00