Commit Graph

442 Commits

Author SHA1 Message Date
Rossen Stoyanchev 79f79e9306 WebClient method to populate the Reactor Context
The alternative is to use a filter but this makes it a little easier
and also guarantees that it will be downstream from all filters
regardless of their order, and therefore the Context will be visible
to all of them.

Closes gh-25710
2020-11-09 22:07:31 +00:00
Aakarshit Uppal 44239b2d7b Remove rogue semicolon 2020-10-29 12:32:20 +00:00
Rossen Stoyanchev 1676470729 Merge branch '5.2.x' into master 2020-10-26 07:49:51 +00:00
Rossen Stoyanchev 86af93a504 Correct sample in webmvc.adoc
Closes gh-25965
2020-10-26 07:40:33 +00:00
Jupiter 43f595f80e Wording changes. Fixed typo 'CorsConfiguraiton' 2020-10-19 14:17:23 +01:00
Rossen Stoyanchev d18fbab7a8 Heartbeat in lieu of non-broker destination message
Closes gh-22822
2020-10-19 13:06:30 +01:00
Rossen Stoyanchev a2ff139edd Resolve UriComponentsBuilder argument with contextPath
Closes gh-25822
2020-10-15 22:08:32 +01:00
Sébastien Deleuze 3ed8813bbf Upgrade to Coroutines 1.4.0-M1 and use awaitSingle()
This commit raises the minimum Coroutines version supported
to 1.4.0-M1 and above, and changes usages of awaitFirst() or
awaitFirstOrNull() to awaitSingle() or awaitSingleOrNull()
to fix gh-25007.

Closes gh-25914
Closes gh-25007
2020-10-13 15:26:39 +02:00
xuxiang 66138f0dce
Fix a few typos in the web reference docs
Closes gh-25893

Co-authored-by: zhiyi.xx <zhiyi.xx@antfin.com>
2020-10-10 16:35:56 +02:00
Sébastien Deleuze 7d7ed88739 Provide WebClient#exchange() alternative for Coroutines
This commit adds awaitExchange { } and
exchangeToFlow { } extensions as Coroutines variants for
exchangeToMono() and exchangeToFlux().

Closes gh-25751
2020-10-07 11:09:12 +02:00
Brian Clozel a0af552d0f Add option for ignoring last-modified for static resources
Prior to this commit, the resource handler serving static resources for
Spring MVC and Spring WebFlux would always look at the
`Resource#lastModified` information, derive the `"Last-Modified"` HTTP
response header and support HTTP conditional requests with that
information.

In some cases, builds or packaging tools choose to set this last
modification date to a static date in the past. This allows tools to
have reproducible builds or to leverage caching given the static
resources content didn't change.

This can lead to problems where this static date (e.g. "1980-01-01") is
used literally in HTTP responses and will make the HTTP caching
mechanism counter-productive: the content of the resources changed, but
the application insists on saying it didn't change since the 80s...

This commit adds a new configuration option to disable this support -
there is no way to automatically discard those dates: there is no
standard for that and many don't use he "EPOCH 0 date" as it can lead to
compatibility issues with different OSes.

Closes gh-25845
2020-10-06 16:30:35 +02:00
Arjen Poutsma 200b33b26a Add no path HTTP method variants for route builder
This commit adds two overloaded methods for each HTTP method in the
WebFlux.fn and WebMvc.fn route builders: one method taking just a
handler function, the other a request predicate and handler function.

After this commit, it is no longer required to provide a String path,
which is particularly useful when nesting routes, and the path would be
"".

Closes gh-25752
2020-10-06 11:00:17 +02:00
Arjen Poutsma 444c8185b6 Add document on async support in WebMvc.fn
This commit adds reference documentation about the support for
asynchronous types in WebMvc.fn.
2020-10-02 15:04:25 +02:00
Arjen Poutsma 8057fb38b2 DefaultPartHttpMessageReader reference docs
This commit changes the WebFlux reference documentation from the
SynchronossPartHttpMessageReader to the DefaultPartHttpMessageReader.

Closes gh-25827
2020-09-28 10:19:49 +02:00
Sam Brannen b34778d220 Polishing 2020-09-26 15:02:15 +02:00
Rossen Stoyanchev 52084ed954 Update WebFlux docs on logging with async appenders
Closes gh-25547
2020-09-25 21:44:35 +01:00
Rossen Stoyanchev 10c5f85a9f WebTestClient documentation updates
See gh-25751
2020-09-25 21:17:07 +01:00
Rossen Stoyanchev dd011c991c Merge branch '5.2.x' into master 2020-09-07 21:41:30 +01:00
Rossen Stoyanchev 94c91c9e9c Explain how to provide serialization view programmatically
Closes gh-25596
2020-09-07 21:27:52 +01:00
Rossen Stoyanchev 591ab8a00a @EnableWebFlux setup supports WebSocketHandler
Closes gh-22587
2020-08-31 21:15:17 +01:00
Rossen Stoyanchev 7bc8035989 Replace http with https in docs sample 2020-08-28 22:30:57 +01:00
Rossen Stoyanchev 42aeb6cd93 Update docs on timeouts with WebClient
Closes gh-25115
2020-08-28 22:19:01 +01:00
Oleksii Klochko 7205edac85
Fix typo in websocket.adoc
Closes gh-25630
2020-08-22 22:56:36 +02:00
Rossen Stoyanchev 683cc2eb7f Add NDJSON and deprecate application/stream+json
Closes gh-21283
2020-07-28 17:53:37 +03:00
Sam Brannen 3d64f8162c Merge branch '5.2.x' 2020-07-20 18:38:32 +02:00
Jay Bryant 1c83b3fc22 Wording changes
Replace potentially insensitive language with more neutral language.

Closes gh-25314
2020-07-20 17:14:13 +02:00
Sam Brannen c972d861ed Revert "Use correct link to MaxInMemorySize"
This reverts commit 90467ba568.
2020-07-08 15:25:46 +02:00
Johnny Lim 90467ba568
Use correct link to MaxInMemorySize
Closes gh-25368
2020-07-08 15:05:24 +02:00
Rossen Stoyanchev 0e4e25d227 Updates to CORS patterns contribution
Closes gh-25016
2020-07-08 13:18:46 +03:00
Sam Brannen f9331d921f Merge branch '5.2.x' 2020-06-23 17:10:33 +02:00
DK Lee 6419b18bee Fix typo in Java example for handler class
Closes gh-25302
2020-06-23 16:46:14 +02:00
Juergen Hoeller 9e12a20324 Polishing 2020-06-23 11:35:22 +02:00
Kamil Szymanski 23aeba0e46 Fix typos in WebRequest.checkNotModified docs
Closes gh-1035
2020-06-23 09:45:07 +02:00
Rossen Stoyanchev ce728a6c4b Update docs for PathPattern support in WebMvc
Closes gh-24945
2020-06-18 21:16:43 +01:00
Sam Brannen 77dd05853c Polishing 2020-06-17 13:35:14 +02:00
Juergen Hoeller d36407d585 Deprecate rarely used bean definition variants
Closes gh-24875
2020-06-17 10:59:55 +02:00
Rossen Stoyanchev 1984cfe9d7 Merge branch '5.2.x' 2020-06-08 21:20:44 +01:00
Rossen Stoyanchev a2d516d526 Replace "whitelist" with alternative words 2020-06-08 21:19:28 +01:00
Sam Brannen cc061ca716 Merge branch '5.2.x' 2020-05-27 16:30:22 +02:00
Sam Brannen 3cbc297fc6 Polish contribution
See gh-25137
2020-05-27 16:29:34 +02:00
limo520 d6cab259c3 Fix URI pattern example in webflux.adoc
Closes gh-25137
2020-05-27 16:14:47 +02:00
Rossen Stoyanchev 147b8fb755 Turn off use of path extensions by default
Closes gh-23915
2020-05-05 08:04:40 +01:00
Rossen Stoyanchev 153690e717 Merge branch '5.2.x' 2020-05-04 10:55:25 +01:00
swapy 9288067ea8 Add missing @PathVariable declarations in examples
Closes gh-25006
2020-05-04 11:19:19 +02:00
martin-tarjanyi 3bc1d42dcd Integrate Apache http client with WebClient
This commit introduces a ClientHttpConnector implementation backed by
Apache HttpComponents HttpClient 5.0.

Fixes gh-24700
2020-04-29 15:02:09 +02:00
rahulmlokurte 0e9da17910
Fix typo in webmvc-functional.adoc
Closes gh-24968
2020-04-25 09:24:15 +02:00
Brian Clozel dc4cda1b13 WARN against invalid patterns with PathPatternParser
As of gh-24952, `PathPatternParser` will strictly reject patterns with
`"**"` in the middle of them. `"**"` is only allowed at the end of the
pattern for matching multiple path segments until the end of the path.

Currently, if `"**"` is used in the middle of a pattern it will be
considered as a single `"*"` instead. Rejecting such cases should
clarify the situation.

This commit prepares for that upcoming change and:

* logs a warning message if such a case is used by an application
* expands the MVC and WebFlux documentation about URI matching in
general

Closes gh-24958
2020-04-23 13:03:05 +02:00
onnadi-sa 75457c440c
Fix typo in webflux-functional.adoc
Closes gh-24906
2020-04-14 15:42:50 +02:00
Rossen Stoyanchev 99c2b1e242 Add snippet for maxInMemorySize config
See gh-23961
2020-03-31 17:08:12 +01:00
Taehee Kim 8b3521d2bf
Fix typo in webflux-cors.adoc
Closes gh-24815
2020-03-30 14:00:25 +02:00
Mikael Elm 822ca0130a
Fix typos and improve readability in Webflux documentation
Closes gh-24781
2020-03-26 15:16:22 +01:00
Arjen Poutsma 9fb614a5c6 Clarify the role of views with Spring MVC
This commit adds a section to the reference docs that explains
views live within the trust boundary of the application, and the
security implications thereof.

Closes gh-24777
2020-03-25 15:05:50 +01:00
Florian Berger d4de3396f7 Fix typo about URI Encoding in docs
Closes gh-24603
2020-02-26 18:28:52 +00:00
Rossen Stoyanchev 7e402ba4fe Improve docs on date and time formatting
Closes gh-24370
2020-02-24 19:05:09 +00:00
Qimiao Chen 1de2e0a4a7
Fix formatting in webflux-webclient.adoc
Closes gh-24578
2020-02-24 15:00:11 +01:00
Rossen Stoyanchev 96e77d417b Update WebFlux section on HTTP/2
Closes gh-24558
2020-02-20 16:28:22 +00:00
Rossen Stoyanchev e35d3b8bb5 Update advice on RestTemplate
Closes gh-24503
2020-02-11 14:02:50 +00:00
Christoph Dreis 15b651cdfe Polish documentation format
See gh-24460
2020-01-31 08:55:52 +01:00
Rob Winch ab70acb325 Fix Additional Asciidoctor Warnings
Fix "unknown style for example block: INFO"

Issue gh-24427
2020-01-24 09:29:13 -06:00
Rob Winch 754a8ca05a Fix Asciidoctor Warnings
- Fix "possible invalid reference" errors
  - Add <filename>.adoc where necessary
  - Remove invalid link to beans-servicelocator This section no longer exists
- Fix "skipping reference to missing attribute" errors
  - Add pass macro to escape literals interpreted as attributes
  - Add missing :api-spring-framework: attribute
  - Remove invalid {JB} attribute

Closes gh-24427
2020-01-24 09:14:07 -06:00
Rossen Stoyanchev c69703ffdb Deprecate path extension strategies
This commit deprecates PathExtensionContentNegotiationStrategy and
ServletPathExtensionContentNegotiationStrategy and also updates code
that depends on them internally to remove that dependence.

See gh-24179
2020-01-22 13:35:09 +00:00
Rossen Stoyanchev 8740c2dc18 Warning against split URL handling in docs
Closes gh-24304
2020-01-13 21:33:11 +00:00
Rossen Stoyanchev dd9b6287b4 Expose ClientCodecConfigurer in WebClient.Builder
Using Consumer<ClientCodecConfigurer> instead of
Consumer<ExchangeStrategies> eliminates one level of nesting that is
also unnecessary since codecs are the only strategy at present.

Closes gh-24124
2019-12-12 21:58:14 +00:00
Rossen Stoyanchev 70a0c93d69 Correct WebFlux docs on BindingResult with @RequestBody
Closes gh-22997
2019-12-10 16:01:33 +00:00
Sam Brannen de8a6c8c57 Polishing 2019-12-06 19:08:54 +01:00
Eric Helgeson d4d940e6e3 Add missing backtick in WebSocket documentation
Closes gh-24155
2019-12-06 19:02:22 +01:00
Johnny Lim 14ce84cebb Fix status code in webflux.adoc 2019-12-05 12:25:04 +00:00
Rossen Stoyanchev 828fe39523 Consistently use releaseBody in DefaultWebClient
See gh-24125
2019-12-04 18:19:52 +00:00
Brian Clozel decbb9ccf9 Provide default codecs config callback to custom codecs
As a follow-up of gh-23961, this change provides a way for custom codecs
to align with the default codecs' behavior on common features like
buffer size limits and logging request details.

Closes gh-24118
Co-authored-by: Rossen Stoyanchev <rstoyanchev@pivotal.io>
2019-12-02 22:52:55 +01:00
Rossen Stoyanchev acfeb77d41 Polishing
See gh-23961
2019-12-02 14:12:59 +00:00
Brian Clozel d4209392d2 Allow ExchangeStrategies customizations in WebClient
Prior to this commit, developers could configure their WebClient to use
their custom `ExchangeStrategies`, by providing it in the
`WebClient.Builder` chain.
Once created, an `ExchangeStrategies` instance is not mutable, which
makes it hard for further customizations by other components. In the
case of the reported issue, other components would override the default
configuration for the codecs maxInMemorySize.

This commit makes the `ExchangeStrategies` mutable and uses that fact to
further customize them with a new `WebClient.Builder#exchangeStrategies`
`Consumer` variant. This commit is also deprecating those mutating
variants in favor of a new `WebClient.Builder#exchangeStrategies` that
takes a `ExchangeStrategies#Builder` directly and avoids mutation issues
altogether.

Closes gh-23961
2019-12-02 14:12:59 +00:00
Brian Clozel 1560bbd81e Revert "Allow ExchangeStrategies customizations in WebClient"
This reverts commit b3020bc484.
2019-12-02 10:39:53 +01:00
Brian Clozel b3020bc484 Allow ExchangeStrategies customizations in WebClient
Prior to this commit, developers could configure their WebClient to use
their custom `ExchangeStrategies`, by providing it in the
`WebClient.Builder` chain.
Once created, an `ExchangeStrategies` instance is not mutable, which
makes it hard for further customizations by other components. In the
case of the reported issue, other components would override the default
configuration for the codecs maxInMemorySize.

This commit makes the `ExchangeStrategies` mutable and uses that fact to
further customize them with a new `WebClient.Builder#exchangeStrategies`
`Consumer` variant. This commit is also deprecating those mutating
variants in favor of a new `WebClient.Builder#exchangeStrategies` that
takes a `ExchangeStrategies#Builder` directly and avoids mutation issues
altogether.

Closes gh-23961
2019-11-29 22:26:52 +01:00
ryenus 40331eaca3 Fix consecutive-word duplications in documentation
See gh-24089
2019-11-27 09:42:44 +01:00
Rossen Stoyanchev 5a552f1670 Update links between WebFlux and Web MVC 2019-11-26 21:50:01 +00:00
Rossen Stoyanchev f4e0288357 Remove mentions of Tomcat async request timeout value
Close gh-24030
2019-11-19 17:08:43 +00:00
denisgalaybo 9526e39f88 Fix errors in reference manual
Closes gh-24008
2019-11-17 13:50:50 +01:00
Sam Brannen a276c667d1 Polishing 2019-11-12 13:48:48 +01:00
Rossen Stoyanchev fac9ca891a Fix copy-and-paste error in docs 2019-11-11 17:31:51 +00:00
Rossen Stoyanchev 51b43496f4 Update docs for ASYNC dispatch config
Closes gh-23958
2019-11-11 14:31:53 +00:00
Rossen Stoyanchev 1403603b05 Doc update for ForwardedHeaderFilter
Closes gh-23954
2019-11-11 11:44:44 +00:00
Sam Brannen 29185505b1 Polishing 2019-11-09 13:51:28 +01:00
Muhammad Hewedy f638bfc6a9 Fix status code in webmvc.adoc
Closes gh-22396
2019-11-08 17:50:48 +00:00
denisgalaybo b0b6423714 Fixed error in webflux.adoc
Closes gh-23957
2019-11-08 17:19:53 +00:00
Rossen Stoyanchev 5abf24e7d7 Expose maxInMemorySize via CodecConfigurer
Centralized maxInMemorySize exposed via CodecConfigurer along with
ability to plug in an instance of MultipartHttpMessageWrite.

Closes gh-23884
2019-10-29 12:33:16 +00:00
Tomasz Letachowicz 9bbf22a1c9 Typos in WebSocket section
Closes gh-23777
2019-10-23 16:55:00 +01:00
Sam Brannen f16e29892e Add note regarding proxyTargetClass for Java config and web controllers
See gh-23744
2019-10-02 13:11:06 +02:00
Martin Macko 96930924b2 Fixes broken links to dev.java.net
Closes gh-23746
2019-10-02 12:48:34 +02:00
Drummond Dawson b7f819c9e1 Fix URI typo in Java code snippet of web-uris.adoc
Closes gh-23739
2019-10-01 15:10:44 +02:00
Sebastien Deleuze 840249778a Polish Kotlin reference documentation for WebMvc.fn
See gh-23657
2019-09-24 10:14:16 +02:00
Arjen Poutsma 9ffecc5059 Polish reference documentation for WebMvc.fn 2019-09-23 16:08:50 +02:00
Arjen Poutsma 652bbdad2a Add reference documentation for WebMvc.fn
This commit introduces reference documentation for WebMvc.fn, the
functional web framework.

Closes gh-23657
2019-09-23 15:27:49 +02:00
Sebastien Deleuze 1dfe304da4 Improve parity between Java and Kotlin router DSL
This commit adds following functions to the Kotlin DSL:
add, filter, before, after and onError.

Closes gh-23524
2019-09-17 12:42:48 +02:00
Sebastien Deleuze 5a0216d657 Improve parity between Java and Kotlin router DSL
This commit adds variants with pattern + predicate to
Kotlin router DSLs, and vararg where necessary.

Closes gh-23524
2019-09-16 22:14:55 +02:00
Sam Brannen 99d88ba14e Document minimum JDK 8 update version
Closes gh-23563
2019-09-05 14:04:43 +02:00
Sebastien Deleuze 40a55b412d Rename BodyBuilder#bodyAndAwait to bodyValueAndAwait 2019-09-05 13:34:11 +02:00
Arjen Poutsma 4c863f3f83 Revise documentation on using WebClient::exchange
This commit revised the paragraph regarding the need to consume or
release the ClientResponse body when using WebClient::exchange.

Closes gh-23498
2019-09-03 15:44:02 +02:00
Sebastien Deleuze 52976246ac Remove bodyWithType extension from WebFlux
Since there is no more clash with the new bodyValue
method name.

Closes gh-23523
2019-08-28 13:30:16 +02:00
Sebastien Deleuze 14558844bc Add Kotlin code snippets to WebFlux refdoc
See gh-21778
2019-08-28 11:18:43 +02:00
Sebastien Deleuze 0d3fb0ee0f Add Kotlin code snippets to WebMvc refdoc
See gh-21778
2019-08-22 16:58:00 +02:00