Commit Graph

80 Commits

Author SHA1 Message Date
Rossen Stoyanchev 1c90d481d5 Rename Motivation to Overview and restore sub-sections 2018-10-05 16:37:56 -04:00
Rossen Stoyanchev d16a710d13 Polish WebFlux codecs section in the docs 2018-10-05 16:36:19 -04:00
Rossen Stoyanchev 4d24503317 Restore sub-section headings in web content
Headings are optimized for how they appear in the left-hand side
navitation menu, with context provided by parent headings, and not
necessarily for how they read on their own.

At 2nd and 3rd level of nesting, which is where most headings are,
the wrapping becomes too distracting and the left-hand side navigation
sprawling.
2018-10-05 15:54:38 -04:00
Jay Bryant 6d226326c9 Editing pass for the integration and languages chapters.
I edited for spelling, puncutation, grammar, usage, and corporate voice. I also added a bunch of cross-references and links to the Javadoc.

I also corrected the rendering problems that I had accidentally created in previous commits (because I was adjusting headings and adding callouts to listings.
2018-09-21 23:27:03 +02:00
Sam Brannen 59e87f950b Fix heading levels in Reference Manual 2018-09-21 16:32:06 +02:00
Jay Bryant 00a3afcda8 Edit the Web chapter of the reference documentation
I edited for spelling, punctuation, grammar, usage,
and corporate voice. I also added links and cross-references.
2018-09-18 11:37:48 +02:00
Sam Brannen 4d7b265258 Fix merge conflict in reference manual 2018-08-15 15:37:49 +02:00
Brian Clozel f2506ca7a1 Revert "Infer HTTP 404 from empty Optional/Publisher types"
This reverts commit 7e91733502.
2018-08-15 15:15:35 +02:00
Sam Brannen a87b319a6f Polishing 2018-08-15 12:16:47 +02:00
Brian Clozel 7e91733502 Infer HTTP 404 from empty Optional/Publisher types
This commit handles "empty" cases for `ResponseEntity` controller
handler return types when wrapped with a `java.util.Optional` in Spring
MVC or a single `Publisher` like `Mono`.

Given the following example for Spring MVC:

```
@GetMapping("/user")
public Optional<ResponseEntity<User>> fetchUser() {
	Optional<User> user = //...
	return user.map(ResponseEntity::ok);
}
```

If the resulting `Optional` is empty, Spring MVC will infer a
`ResponseEntity` with an empty body and a 404 HTTP response status.

The same reasoning is applied to Spring WebFlux with Publisher types:

```
@GetMapping("/user")
public Mono<ResponseEntity<User>> fetchUser() {
	Mono<User> user = //...
	return user.map(ResponseEntity::ok);
}
```

This feature is only valid for `HttpEntity` return types and does not
apply to `@ResponseBody` controller handlers.

Issue: SPR-13281
2018-08-15 11:59:16 +02:00
Rossen Stoyanchev a8a1fc6de5 Earlier processing of forwarded headers
Forwarded headers are now processed before ServerWebExchange is created
through ForwardedHeaderTransformer which has the same logic as the
ForwardedHeaderFilter but works on the request only.

ForwardedHeaderFilter is deprecated as of 5.1 but if registered it is
removed from the list of filters and ForwardedHeaderTransformer is used
instead.

Issue: SPR-17072
2018-08-03 15:16:09 +03:00
Rossen Stoyanchev 31024b1f93 Add sections on logging for Spring MVC and WebFlux
Issue: SPR-17032
2018-07-31 23:06:48 +03:00
sdeleuze 36a07aa897 Support Protobuf serialization in WebFlux
This commit introduces Protobuf support in WebFlux via dedicated
codecs.

Flux<Message> are serialized/deserialized using delimited Protobuf
messages with the size of each message specified before the message
itself. In that case, a "delimited=true" parameter is added to the
content type.

Mono<Message> are expected to use regular Protobuf message
format (without the size prepended before the message).

Related HttpMessageReader/Writer are automatically registered when the
"com.google.protobuf:protobuf-java" library is detected in the classpath,
and can be customized easily if needed via CodecConfigurer, for example
to specify protocol extensions via the ExtensionRegistry based
constructors.

Both "application/x-protobuf" and "application/octet-stream" mime types
are supported.

Issue: SPR-15776
2018-07-25 01:17:06 +02:00
Rossen Stoyanchev 931581a1e0 Polish Reactive Spring Web section 2018-07-09 14:27:23 -04:00
Rossen Stoyanchev 928b7804c8 Add example of explicit handler method registration
Issue: SPR-16336
2018-06-12 15:23:45 -04:00
Rossen Stoyanchev ef41dcf687 Add HTTP caching to WebFlux section
Issue: SPR-16395
2018-06-11 16:39:12 -04:00
Rossen Stoyanchev 19dc981685 Path prefixes for groups of controllers
Issue: SPR-16336
2018-06-07 18:18:42 -04:00
Violeta Georgieva ffbc75ae47 Upgrade to Reactor Netty 0.8
Issue: SPR-16387
2018-05-31 15:37:39 -04:00
Rossen Stoyanchev eed663ff7e Fix error in WebFlux chapter on static resources
Issue: SPR-16864
2018-05-23 21:27:02 -04:00
Rossen Stoyanchev 5207672b3f Configurable support for static resource encodings
The new EncodedResourceResolver is a generalized version of
GzipResourceResolver that can be configured to support different
content codings, by "br" and "gzip".

GzipResourceResolver is now deprecated.

Issue: SPR-16381
2018-05-23 09:17:21 -04:00
Rossen Stoyanchev 4da43de7e1 Remove individual detection of forwarded headers
This commit removes all places where forwarded headers are checked
implicitly, on an ad-hoc basis.

ForwardedHeaderFilter is expected to be used instead providing
centralized control over using or discarding such headers.

Issue: SPR-16668
2018-05-11 09:31:39 -04:00
Juergen Hoeller a200df6c8d Explicit coverage of root vs cause exception matching in MVC ref docs
Issue: SPR-16743
2018-05-07 22:30:26 +02:00
Juergen Hoeller 7b894fe73b ResponseEntityExceptionHandler rethrows unknown exception (for further processing in DispatcherServlet's HandlerExceptionResolver chain)
Issue: SPR-16743
2018-05-05 12:46:58 +02:00
Jeremy Wright 1edd7c3540 Grammatical change. 2018-04-30 16:34:04 -04:00
Daniel Kift 7eb8070d55 Polish WebFlux reference documentation 2018-04-18 12:00:53 +02:00
sdeleuze 27e87e5593 Document why "charset=UTF-8" is specified for JSON
Issue: SPR-14715
2018-04-09 12:03:17 +02:00
KwonJH 967ea152b7 Fix Java 9 link in the reference documentation 2018-04-09 11:10:37 +02:00
Rossen Stoyanchev 65fdd0efeb [docs] Updates for exception handling in web sections
Issue: SPR-16394
2018-04-02 00:51:14 -04:00
Rossen Stoyanchev 9dd3cd98ac [docs] Move Filters section under Reactive Spring Web
Issue: SPR-16394
2018-04-02 00:50:56 -04:00
Juergen Hoeller 0bc01fcd55 Polishing 2018-03-30 13:42:23 +02:00
Rossen Stoyanchev dd96c873e3 Improve docs on forwarded headers
Issue: SPR-16660
2018-03-29 16:11:01 -04:00
Rossen Stoyanchev 19875d8e3f Document WebFlux concurrency model
Issue: SPR-16538
2018-03-26 09:59:38 -04:00
Rossen Stoyanchev 94c525cdc8 Polish @RequestPart support 2018-03-21 18:26:13 -04:00
Juergen Hoeller 578c04ea17 Consistent table declarations (including fix for disarranged FTL macros)
Issue: SPR-16612
2018-03-19 12:41:22 +01:00
Rossen Stoyanchev eb96ff2943 Doc improvements related to HTTP streaming
Issue: SPR-16494
2018-03-07 17:07:09 -05:00
Rossen Stoyanchev 2b4250ec44 [doc] WebFlux has coverage of URI links
Issue: SPR-16423
2018-02-16 12:58:01 -05:00
Johnny Lim 5c0ddf3c69 Polishing 2018-02-07 10:59:10 +01:00
sdeleuze 31b25b5808 Make WebFlux Jackson refdoc section relevant for Smile
Issue: SPR-16151
2018-02-05 18:00:41 +01:00
Rossen Stoyanchev d9a93f44ae [doc] Update links to composed annotations 2018-01-31 20:39:34 -05:00
Rossen Stoyanchev b77032c36e [doc] Explain custom/composed @RequestMapping annotations
Issue: SPR-16442
2018-01-31 11:03:37 -05:00
Rossen Stoyanchev 5ff724968d [docs] View Technologies section in WebFlux
Issue: SPR-16393
2018-01-29 21:28:48 -05:00
Rossen Stoyanchev e76973c5f0 [docs] Update view-related content
1. The View Technologies chapter in Spring MVC
2. The View Resolution and View Resolver config in WebFlux

Issue: SPR-16393
2018-01-29 16:43:51 -05:00
Rossen Stoyanchev 00b95b10a8 Docs: result handling and view resolution
Issue: SPR-16393
2018-01-26 22:14:14 -05:00
Rossen Stoyanchev cf812ba831 Reference docs: improve async request content 2018-01-24 17:28:20 -05:00
Jan Nielsen fed81c6f83 Fix doc typo
Closes gh-1646
2018-01-17 18:06:17 +01:00
Jan Nielsen df9761cb3f Fix doc typo
Closes gh-1645
2018-01-17 18:05:39 +01:00
Rossen Stoyanchev 12baafd4f0 WebFlux docs: security + consistent order for WebFlux config 2018-01-16 23:23:26 -05:00
Rossen Stoyanchev bb7152d6e7 WebFlux docs: matrix variables
Issue: SPR-16040
2018-01-16 22:53:40 -05:00
Rossen Stoyanchev 61fc321554 WebFlux docs: Request|ResponseBody + Http|ResponseEntity
Issue: SPR-16040
2018-01-16 22:10:04 -05:00
Rossen Stoyanchev 4f2e54fc2d Document multipart data support for WebFlux
Issue: SPR-16040
2018-01-16 16:53:19 -05:00