Commit Graph

15796 Commits

Author SHA1 Message Date
sdeleuze
deac8e556e Improve Kotlin extensions doc about type erasure
Since type erasure can be fixed only when using
ParameterizedTypeReference based Java methods, RestOperations and
WebFlux API documentation should be updated to specify which extensions
are subject to type erasure, and which are not.

Issue: SPR-16273
2017-12-27 17:49:18 +01:00
Stephane Nicoll
8fc16fc937 Merge pull request #1627 from nkjackzhang:patch-1
* pr/1627:
  Polish Javadoc
2017-12-23 14:20:28 +01:00
nkjackzhang
ec6eed6c63 Polish Javadoc
Closes gh-1627
2017-12-23 14:19:56 +01:00
Rossen Stoyanchev
3aee3182ac Restore milestone repo for AspectJ 2017-12-22 15:13:48 -05:00
Rossen Stoyanchev
f389f66270 Upgrade to Reactor Bismuth snapshots
This allows us to confirm 0.7.3 fixes and run tests against the latest
ahead of an upgrade to Reactor Netty 0.8 snapshots.

The fix for #231 and #240 are confirmed but unfortunately test case for
2017-12-22 12:50:18 -05:00
Arjen Poutsma
6c3a64578c Move ResolvableType from HttpEntity to PublisherEntity
This commit moves the ResolvableType field from HttpEntity to
PublisherEntity, a new entity type defined in MultipartBodyBuilder.
With this change, the scope of the ResolvableType is limited to
multipart-related code, instead of becoming part of the complete
HttpEntity hierarchy.

Issue: SPR-16307
2017-12-22 13:44:01 +01:00
Brian Clozel
6e587d5c57 Add new WebTestClient header assertions
This commit adds new header assertions for `WebTestClient`.

`doesNotExist` tests that a given header is not present:

    .expectHeader().doesNotExist("Cache-Control");

`contentTypeCompatibleWith` tests for MediaType compatibility:

    .expectHeader().contentTypeCompatibleWith("text/*");

Issue: SPR-16285
2017-12-21 20:34:24 +01:00
Arjen Poutsma
7035ee7ebb Support Publishers for multipart data in BodyInserters
This commit uses the changes in the previous commit to support
Publishers as parts for multipart data.

Issue: SPR-16307
2017-12-21 17:41:01 +01:00
Arjen Poutsma
f23612c3a3 Add ResolvableType to HttpEntity for multipart Publishers
This commit adds a ResolvableType field to HttpEntity, in order to
support Publishers as multipart data. Without the type, the
MultipartHttpMessageWriter does not know which delegate writer to use to
write the part.

Issue: SPR-16307
2017-12-21 17:40:27 +01:00
Juergen Hoeller
9d27e86951 Upgrade to Hibernate Validator 6.0.7 2017-12-21 17:00:06 +01:00
Juergen Hoeller
4577a19190 Upgrade to Commons Pool 2.5 (and Jackson Kotlin Module 2.9.3) 2017-12-21 13:52:00 +01:00
sdeleuze
0075f13126 Improve CORS list properties combination logic
This commit allows CorsConfiguration#combine()
to differentiate permit default values set by
CorsConfiguration#applyPermitDefaultValues()
from values configured explicitly by the user.

Those permit default values will be overridden
by any user-provided ones while user-provided values
will be combined in an additive way, including
when "*" is specified.

Documentation has been improved accordingly.

Issue: SPR-15772
2017-12-20 22:38:01 +01:00
Juergen Hoeller
425a999d5e Upgrade to Gradle 4.4.1 (and Netty 4.1.19)
Issue: SPR-16237
2017-12-20 18:10:15 +01:00
Rossen Stoyanchev
a8cf275aed MockServerHttpRequest builder supports query params
Issue: SPR-16280
2017-12-19 15:38:12 -05:00
Rossen Stoyanchev
6df1a7874a MockHttpServletResponse uses correct language header
Issue: SPR-16311
2017-12-19 13:56:16 -05:00
sdeleuze
99cbfd32c3 Set default view content-type with WebFlux fn
With this commit, the default content-type defined by the
view (usually "text/html;charset=UTF-8" defined in AbstractView)
is used if any, when none is defined in the response headers.

Issue: SPR-16247
2017-12-19 11:11:40 +01:00
sdeleuze
e3e4f37222 Upgrade to Kotlin 1.2.10 2017-12-19 11:03:50 +01:00
Juergen Hoeller
3a51b5a9d2 Upgrade to Hibernate Validator 6.0.6 2017-12-15 15:58:12 +01:00
Arjen Poutsma
b8201f48fd Typo in example code in spring reactive reference document
Issue: SPR-16300
2017-12-15 12:03:14 +01:00
Rossen Stoyanchev
f4d8c7cc2b Improve decodeToMono support
This commit ensures uniform support for decodeToMono across the various
byte and String related decoders.

Issue: SPR-16253
2017-12-14 16:59:34 -05:00
Arjen Poutsma
8e253a316d Support top-level scalar values in Jackson2Tokenizer
Issue: SPR-16166
2017-12-14 16:44:40 +01:00
sdeleuze
51aa16f85f Remove -Xskip-runtime-version-check Kotlin compiler arg
This compiler argument is not needed anymore since KT-16780
has been fixed.
2017-12-14 15:08:00 +01:00
sdeleuze
8c2e5dcb4a Update Kotlin reference documentation
This commit removes the mention that Spring Boot 2.0 includes
Jackson Kotlin module since it is not the case as of M7, and
add a note about using bean validation annotations with Kotlin.
2017-12-14 14:22:59 +01:00
Juergen Hoeller
05988193b7 Upgrade to Jackson 2.9.3 and Netty 4.1.18 2017-12-13 17:55:50 +01:00
sdeleuze
6a7b197af7 Improve Jackson codecs documentation 2017-12-13 12:07:43 +01:00
sdeleuze
73a81f98d4 Allow interceptors to add existing header values
Additional commit to provide support of requests
that have a body.

Issue: SPR-15066
2017-12-13 10:08:24 +01:00
Rossen Stoyanchev
583201b02c MappingJackson2MessageConverter uses generic type
Issue: SPR-16252
2017-12-12 22:32:33 -05:00
Rossen Stoyanchev
f05175586e Refine behavior on error after response committed
If the response is set and we can't change the status through
ServerHttpResponse any more, allow the error signal to propagate and
let the individual server adapters handle it. Ultimately that should
result in closing the connection.

On Servlet containers, we check one last time if the response is
committed (we may not have filled the buffer). If not then save
the exception as a request attribute, dispatch, and re-throw it on the
container thread.

On Undertow access the connection and close it.

On Netty just let the error through to Reactor Netty.

Issue: SPR-16051
2017-12-12 14:51:24 -05:00
Juergen Hoeller
9d421841d5 Merge pull request #1622 from dreis2211/SPR-16293
Improve performance of some string operations

Issue: SPR-16293
2017-12-12 18:36:07 +01:00
Christoph Dreis
260ebeca3a Improve performance of some string operations
Issue: SPR-16293
2017-12-12 17:14:24 +01:00
Rossen Stoyanchev
f736b665bd Fix compile issue from previous commit 2017-12-11 16:37:11 -05:00
Rémi Alvergnat
76dcde9e31 Fix Stomp Broker Relay ignoring destination prefixes in some cases
Issue: SPR-16265
2017-12-11 13:25:29 -08:00
sdeleuze
554662ebab Allow interceptors to add existing header values
Provide a fully mutable HttpHeaders to ClientHttpRequestInterceptors
of a RestTemplate when headers are set using HttpEntity. This avoids
UnsupportedOperationException if both HttpEntity and
ClientHttpRequestInterceptor add values for the same HTTP header.

Issue: SPR-15066
2017-12-11 15:01:20 +01:00
sdeleuze
ac00d8a215 Use JCenter first to resolve plugins
This is a workaround for Kotlin/dokka#146.
2017-12-11 12:07:17 +01:00
sdeleuze
769ea1b106 Fix Kdoc regression to show only Kotlin API
As of Gradle Kotlin plugin 1.1.60,
project.sourceSets.main.kotlin.srcDirs contains
Java source directories in addition to Kotlin
ones. This commit filter out Java sources to
retain only Kotlin ones.

Issue: SPR-16268
2017-12-11 11:28:39 +01:00
Stephane Nicoll
206a5e02dd Merge pull request #1615 from gro-gg:patch-1
* pr/1615:
  Fix exception message
2017-12-09 15:46:55 -08:00
Philipp Grogg
591429e538 Fix exception message
initialDelayString is parsed into long, not integer.

Closes gh-1615
2017-12-09 15:46:28 -08:00
Juergen Hoeller
d198626618 Upgrade to Gradle 4.4 (and Apache HttpClient 4.5.4)
Issue: SPR-16237
2017-12-07 07:28:07 +01:00
Sam Brannen
767ea9db83 Fix minor logic error in SocketUtils 2017-12-06 17:00:29 -08:00
Tony Mitchell
9f36d170be Support identical minPort and maxPort in SocketUtils (#1612)
This commit fixes a bug where an IllegalStateException was
thrown if the minPort and maxPort values supplied to
SocketUtils.findAvailableTcpPort(int, int) were identical.
2017-12-06 16:38:46 -08:00
Sam Brannen
f9689dfe48 Polishing 2017-12-06 15:54:02 -08:00
Juergen Hoeller
bf8831157d Merge pull request #1614 from dreis2211/SPR-16264
Reduce access on user in SimpleBrokerMessageHandler.handleMessageInternal
2017-12-06 00:40:38 +01:00
Christoph Dreis
f4e9fb52a8 Reduce access on user in SimpleBrokerMessageHandler.handleMessageInternal
Issue: SPR-16264
2017-12-05 11:18:02 +01:00
ugultopu
04ab93ceb4 Add missing verb on the note about relays 2017-12-04 11:20:39 -05:00
Juergen Hoeller
0ef117ff11 Upgrade to Tomcat 8.5.24 and Jetty 9.4.8 2017-12-03 16:03:02 +01:00
Rossen Stoyanchev
fda08852ba Take content-type from ResponseEntity unconditionally
From #9a894a we began using the content-type from the ResponseEntity
but cross-checking it still against the requested content type.

Arguably there isn't any purpose in cross-checking. The only possible
outcomes are: a) it's compatible or b) it's not, which would result in
406 (NOT_ACCEPTABLE). As we've been given explicitly the media type to
use, it makes little sense to send 406, ignoring the wish to use that
content type.

Issue: SPR-16251
2017-12-02 00:43:43 -05:00
Rossen Stoyanchev
203370a810 Handle absolute URI in Reactor request.uri()
The request URI returned from HttpServerRequest.uri() typically
contains contains an absolute path but could also contain an
absolute URI. This commit adds handling for the latter, effectively
taking only the absolute path portion.

Issue: SPR-16243
2017-12-01 23:34:35 -05:00
Rossen Stoyanchev
b9a1168580 Consistently return null if certificates not available
Issue: SPR-16244
2017-12-01 21:38:40 -05:00
Rossen Stoyanchev
e99b0038a0 Polish 2017-12-01 21:18:13 -05:00
Rossen Stoyanchev
91d3e4402f Add test case for SPR-16246 2017-12-01 15:40:35 -05:00