Commit Graph

15486 Commits

Author SHA1 Message Date
Rossen Stoyanchev 7a8c8c062e Add reactive mocks to testing section 2017-09-29 20:21:01 -04:00
Rossen Stoyanchev 48c41049b1 Correct package for MockServerWebExchange
Discovered late, but not too late. MockServerWebExchange is now in the
proper package matching to the location of ServerWebExchange.
2017-09-29 17:03:23 -04:00
Rossen Stoyanchev 223e27d53d Package private request and response implementations
Concrete server and client, reactive request and response
implementations should not have to be accessed outside their package.
They could be seen as private to their HttpHandler adapters and
ClientHttpConnector's respectively.

The one exception, WebSocket upgrades in spring-webflux, is an internal
framework use case, accommodated via downcast + accessors in the
abstract base classes.
2017-09-29 13:04:03 -04:00
Juergen Hoeller 95fdfac128 Upgrade to Gradle 4.2 (and Netty 4.1.16)
Issue: SPR-15985
2017-09-29 17:57:11 +02:00
Stephane Nicoll cee9d1c08f Fix formatting
Closes gh-1483
2017-09-29 14:41:57 +02:00
Stephane Nicoll 1f0f292bab Merge pull request #1535 from nkjackzhang:patch-3
* pr/1535:
  Fix typos in spring-mvc.xsd
2017-09-29 14:36:59 +02:00
nkjackzhang b11d1f5f9b Fix typos in spring-mvc.xsd
Closes gh-1535
2017-09-29 14:36:26 +02:00
Stephane Nicoll f2d040c41c Fix link to "Message Converters" section
Issue: SPR-16024
2017-09-29 14:31:50 +02:00
Sebastien Deleuze 12e1ad9163 Upgrade to Kotlin 1.1.51 2017-09-29 12:30:20 +02:00
Arjen Poutsma 69945f4185 WebClient throws ClassCastException for bodyToMono(ParameterizedTypeReference)
Prior to this commit, the `WebClient` always throws a `ClassCastException`
when an error occurs in `bodyToMono(ParameterizedTypeReference)``, and
not the expected exception, as set up by `onStatus`

Issue: SPR-16025
2017-09-29 10:15:40 +02:00
Rossen Stoyanchev d332e06f6c Update reference after removal of ClientResponse.close() 2017-09-28 16:11:48 -04:00
David Harrigan b7708d989b Improve Kotlin documentation readability 2017-09-28 22:02:25 +02:00
Rossen Stoyanchev 2c2bbb45b9 Fix typo 2017-09-28 14:53:43 -04:00
Nikola Kolosnjaji 7c5dd03c9d Correct ResourceTransformer name 2017-09-28 19:55:07 +02:00
Sam Brannen 2408e2515a Escape hashtag in Testing chapter to disable Asciidoc highlighting 2017-09-28 16:44:08 +02:00
Jussi Hallila 1440026fb4 Change bean registration to use initialize
This commit changes the reference documentation to conform
with the updated API defined in
8b8a6766de
2017-09-28 15:02:25 +02:00
Spring Buildmaster 5c7bd0a9ea Next Development Version 2017-09-28 11:28:33 +00:00
Juergen Hoeller c078e2eb1d Overview with explicit JDK 9 (Jigsaw) and Java EE 8 references 2017-09-28 11:47:50 +02:00
Juergen Hoeller 255ccf58e0 Remove snapshot repository from build setup 2017-09-28 11:45:33 +02:00
Rossen Stoyanchev 5733065ba4 Rename webflux-client.adoc to webflux-webclient.adoc 2017-09-28 01:16:51 -04:00
Rossen Stoyanchev 67910ee48c WebFlux and Integration share webflux-client.adoc
Extract WebClient content into a separate file that is now included
both in the WebFlux and in the Integration sections.

This allows having RestTemplate and WebClient documented in one place
under Integration while also keeping the same included in the WebFlux
section too.
2017-09-27 23:34:45 -04:00
Rossen Stoyanchev 71ccf3c9e3 Polish 2017-09-27 22:48:26 -04:00
Rossen Stoyanchev 13c959296a Polish 2017-09-27 22:04:07 -04:00
Rossen Stoyanchev 869b818e96 WebFlux support for LocaleContext related arguments
Issue: SPR-15998
2017-09-27 22:03:42 -04:00
Rossen Stoyanchev 0f1bd49f6d HandlerMappingIntrospector is a bean 2017-09-27 21:28:49 -04:00
Brian Clozel 126ac849e5 Fix behavior of ClientResponse#bodyTo** with Void
Prior to this commit, asking for a `Void` type using any of the
`ClientResponse#bodyTo*` methods would immediately return an empty
`Publisher` without consuming the response body.

Not doing so can lead to HTTP connection pool inconsistencies and/or
memory leaks, since:

* a connection that still has a response body being written to it cannot
be properly recycled in the connection pool
* incoming `DataBuffer` might not be released

This commit detects when `Void` types are asked as body types and in
those cases does the following:

1. Subscribe to the response body `Publisher` to allow the connection to
be returned to the connection pool
2. `cancel()` the body `Publisher` if the response body is not empty; in
that case, we choose to close the connection vs. consume the whole
response body

Those changes imply that `ClientHttpResponse` and other related
contracts don't need a `close()` method anymore.

Issue: SPR-16018
2017-09-28 00:58:38 +02:00
Juergen Hoeller ec345bf162 Revised handling of missing data class arguments
Includes unified detection of Kotlin's optional parameters in MethodParameter.isOptional(), reduces BeanUtils.findPrimaryConstructor to Kotlin semantics (for reuse in AutowiredAnnotationBeanPostProcessor), and finally introduces a common KotlinDetector delegate with an isKotlinType(Class) check.

Issue: SPR-15877
Issue: SPR-16020
2017-09-28 00:31:12 +02:00
Sam Brannen d3129a8bd7 Convert selected examples to JUnit Jupiter in reference manual
Issue: SPR-14524
2017-09-27 23:27:44 +02:00
Sam Brannen 8c9d42f793 Document SpringExtension for JUnit Jupiter in reference manual
Issue: SPR-14524
2017-09-27 23:01:59 +02:00
Sebastien Deleuze 492c469d79 Polish Kotlin reference documentation 2017-09-27 22:54:18 +02:00
Sebastien Deleuze 142c16611d Upgrade to Gradle asciidoctor plugin 1.5.6 2017-09-27 21:31:34 +02:00
Rossen Stoyanchev 6ee1af27c6 WebFlux supports HTTP HEAD
Issue: SPR-15994
2017-09-27 15:25:29 -04:00
Sam Brannen d8d74faab8 Polishing 2017-09-27 21:04:58 +02:00
Sam Brannen e995854f11 Cross reference SpEL and Environment from JUnit Jupiter documentation
Issue: SPR-14524
2017-09-27 20:05:50 +02:00
Juergen Hoeller a1a7c62127 Consistent configurer access in WebMvcConfigurationSupport
Issue: SPR-16017

(cherry picked from commit 40ba95f)
2017-09-27 19:52:48 +02:00
Sebastien Deleuze 00c0d7847f Add spring-petclinic-kotlin to Kotlin refdoc 2017-09-27 16:37:10 +02:00
Sam Brannen 550bed2905 Document JUnit Jupiter annotation support in the reference manual
Issue: SPR-14524
2017-09-27 16:25:30 +02:00
Sam Brannen 1a8122f97a Update Testing chapter regarding Servlet 4.0 API for mocks 2017-09-27 16:25:30 +02:00
Sam Brannen 2b91d668df Polish Javadoc for @DisabledIf 2017-09-27 16:25:30 +02:00
Juergen Hoeller 75bd516251 Refined TemporaryLobCreator null handling (from 4.3.x)
Issue: SPR-15656
2017-09-27 15:40:13 +02:00
Brian Clozel 10139d42fc Revisit meaning of response.close() in HTTP client
Prior to this issue, SPR-15920 added this new `close()` method which was
supposed to be called to clean resources after response processing.

This commit changes the meaning of that method: calling `close()` will
close the underlying HTTP connection. This has to be called if the
response body is not consumed by the application, since at that point
the underlying connection might be in an inconsistent state if shared in
a connection pool.

Issue: SPR-15993
2017-09-27 14:03:55 +02:00
Sebastien Deleuze fb09a75c82 Improve support of Kotlin beans w/ primary and default ctors
This commit add the default constructor if available as
fallback after to the primary constructor.

Issue: SPR-16012
2017-09-27 11:27:00 +02:00
Rossen Stoyanchev ec5969c578 InMemoryWebSession cleans up expired sessions
Issue: SPR-15963
2017-09-27 01:43:11 -04:00
Rossen Stoyanchev 15cc44e6e8 Add WebSession.invalidate()
Issue: SPR-15960
2017-09-27 00:10:38 -04:00
Rossen Stoyanchev 6da3518a66 WebSessionStore updates lastAccessTime on retrieve
Now that WebSessionStore is in charge of expiration checks on retrieve
it makes sense to also update the lastAccessTime on retrieve at the
same time, saving the need to call it after a retrieve.

Issue: SPR-15963
2017-09-26 23:12:58 -04:00
Rossen Stoyanchev cb2deccb2d WebSessionStore performs expiration check on retrieve
Issue: SPR-15963
2017-09-26 23:12:12 -04:00
Sebastien Deleuze fbb428f032 Polishing
Issue: SPR-16014
2017-09-27 01:35:25 +02:00
Juergen Hoeller efce7902c4 Polishing 2017-09-27 01:34:11 +02:00
Juergen Hoeller a4b2ae583e Expose AspectJ 1.8.11 in POMs (and use it for all tests)
Issue: SPR-15974
2017-09-27 01:34:02 +02:00
Sebastien Deleuze 23497a7ece Support autowiring by constructor in Kotlin bean DSL
Issue: SPR-16014
2017-09-27 01:25:22 +02:00