Commit Graph

356 Commits

Author SHA1 Message Date
Kyle Carter 8848e6ab9f Fix usage of deprecated functionality in docs
Closes gh-1934
2018-08-20 09:43:11 +02:00
Sebastien Deleuze 1eb06fcd90 Introduce JettyResourceFactory
JettyResourceFactory, similar to ReactorResourceFactory, allows
to share resources (Executor, ByteBufferPool, Scheduler) between
Jetty clients and servers.

Issue: SPR-17179
2018-08-16 18:17:07 +02:00
Juergen Hoeller 50b6f9da1d Reference documentation covers async Hibernate/JPA bootstrap options
Issue: SPR-17189
2018-08-16 17:30:44 +02:00
Rossen Stoyanchev 31c7807ac9 Fix doc issue with Reactor HttpClient config 2018-08-16 18:21:00 +03: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
Juergen Hoeller c0c9e08bf9 Revised documentation for PDF, Excel and JSON views
Issue: SPR-17180
Issue: SPR-17182
2018-08-14 20:36:29 +02:00
Rossen Stoyanchev 3e4d305291 Polish ReactorResourceFactory 2018-08-14 17:34:17 +03:00
Rossen Stoyanchev 7a0c03e05e Update section in reference on WebClient
Rename "Builder" sub-section to "Configuration" and move it in the
beginning before all others since it explains how to create a client
in the first place.

Update content on Reactor Netty connector based on the API in 0.8 and
specifically address Reactor Netty resources and lifecycle.

Issue: SPR-16963
2018-08-14 15:48:46 +03:00
Stephane Nicoll 8d08935c49 Disable quotes substitution in code sample
Issue: SPR-17167
2018-08-12 11:12:53 +02:00
Rossen Stoyanchev 57ded51de0 Fix link from Spring MVC to OXM chapter 2018-08-09 10:28:08 +03:00
Juergen Hoeller 58e9706991 Polishing 2018-08-09 02:26:36 +02:00
Rossen Stoyanchev a0dfdfcac3 Hierarchy under WebClientResponseException
Issue: SPR-17145
2018-08-08 15:34:08 +03:00
Kazuhiro Sera be211ceead Fix typos detected by github.com/client9/misspell 2018-08-08 12:50:46 +02:00
Juergen Hoeller 2b051b8b32 Deprecate support classes for Sun's JDK HTTP server
Issue: SPR-17143
2018-08-07 20:35:53 +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
Jason Zhekov 0878e438e5 Delete MockServer when using RestTemplate with MockMvc 2018-08-03 10:07:04 +03:00
Rossen Stoyanchev 65d5cb3663 Typo in URI Encoding section
Issue: SPR-17104
2018-07-31 23:27:00 +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
Pascal Schumacher aa656c47b8 Fix typo in notes on future deprecation of the RestTemplate
Issue: SPR-16993

Obvious Fix
2018-07-27 14:13:19 -04:00
Rossen Stoyanchev 91d17cf628 Add notes on future deprecation of the RestTemplate
Issue: SPR-16993
2018-07-27 08:41:20 -04:00
Juergen Hoeller 8277ea5794 Revise BeanFactory vs ApplicationContext section in reference docs
Issue: SPR-17095
2018-07-26 18:48:34 +02:00
Juergen Hoeller e366b20037 Polishing 2018-07-26 15:46:55 +02: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 2fdb8c9c8c Update STOMP section on working with subscriptions
1. Revise @SubscribeMapping to address common points of confusion.
2. Add ExecutorSubsribableChannel.
3. Split Events and Interception in two.

Issue: SPR-16950
2018-07-24 12:23:13 -04:00
Rossen Stoyanchev 9b2c8404dc "Order of messages" in STOMP section of reference docs
Issue: SPR-13989
2018-07-24 12:23:13 -04:00
Rossen Stoyanchev 28cd6978b5 Minor fixes: UriComponentsBuilder, UriComponents, docs
After the latest changes, two small fixes in the clone method to copy
the encode flag, and in the encodeUriTemplate method to account for
possible null query params.

Improvements in the URI encoding section.

Issue: SPR-17039, SPR-17027
2018-07-19 19:07:42 -04:00
Juergen Hoeller f8553117d0 Polishing
(cherry picked from commit 4341838)
2018-07-18 14:58:43 +02:00
sdeleuze a87764f1fd Add support for Jetty Reactive Streams HTTP client
Leverage https://github.com/jetty-project/jetty-reactive-httpclient
to add support for Jetty in WebClient via JettyClientHttpConnector.

Implemented with buffer copy instead of optimized buffer wrapping
because the latter hangs since Callback#succeeded doesn't allow
releasing the buffer and requesting more data at different times
(required for Mono<DataBuffer> for example).
See https://github.com/eclipse/jetty.project/issues/2429.

Issue: SPR-15092
2018-07-18 14:49:49 +02:00
Andrew McCallum d8878e4513 Correct method signature in code example
Closes gh-1887
2018-07-18 09:07:31 +02:00
Rossen Stoyanchev 6c4289e238 Polish 2018-07-17 17:39:16 -04:00
Rossen Stoyanchev 0bd7a3646c Update URI Encoding section 2018-07-17 15:58:27 -04:00
Rossen Stoyanchev d8a2927dd3 Update URI links section after encoding changes
Issue: SPR-17039
2018-07-16 21:21:37 -04:00
Stephane Nicoll 333ec7400e Fix typo
Issue: SPR-17042
2018-07-15 16:17:48 +02:00
Rossen Stoyanchev 7b3a72f483 Warn when SimpleAsyncTaskExecutor is used
Issue: SPR-16203
2018-07-11 11:10:03 -04:00
Guilherme Alan Ritter 7f54ae109a Fix typo
Closes gh-1880
2018-07-10 15:39:31 +02:00
Rossen Stoyanchev 931581a1e0 Polish Reactive Spring Web section 2018-07-09 14:27:23 -04:00
Juergen Hoeller 39d455073a Update ref doc references to Number/Currency/PercentStyleFormatter
Issue: SPR-17022
2018-07-09 15:48:45 +02:00
Sam Brannen 581acb62a0 Refine wording 2018-07-08 14:11:04 +02:00
Sam Brannen 8d09222799 Improve description of return value for queryForList(..) 2018-07-08 13:34:56 +02:00
Juergen Hoeller 094c9b8bd2 LocalSessionFactoryBean and HibernateTransactionManager for JPA setup
SessionHolder extends EntityManagerHolder now, allowing for @PersistenceContext and co to interact with HibernateTransactionManager's thread-bound transactions, and SpringSessionContext is capable of interacting with JpaTransactionManager by detecting a plain EntityManagerHolder as well.

Issue: SPR-17002
2018-07-04 15:07:09 +02:00
Juergen Hoeller d58c09b89f Up-to-date coverage of task executor and scheduler variants
Includes a clarification of ThreadPoolExecutor configuration options and a note on early AsyncConfigurer initialization.

Issue: SPR-16944
Issue: SPR-16945
2018-06-29 19:43:14 +02:00
Ryan Yin df38af361c Fix broken link to CONTRIBUTING.md
Closes gh-1860
2018-06-19 09:07:07 +02:00
Rossen Stoyanchev c97acbbd8d Fix documentatio issue 2018-06-18 20:29:35 -04:00
Rossen Stoyanchev 28a5c3009e Improve DEBUG/TRACE logging for Spring MVC
Issue: SPR-16898
2018-06-18 18:33:11 -04:00
Sam Brannen 4184ebe799 Polish profile expression support
Issue: SPR-12458
2018-06-16 21:40:22 +03:00
Stephane Nicoll 1f3b4f1863 Polish "Add profile expression support"
Issue: SPR-12458
2018-06-15 16:01:16 +02:00
Rossen Stoyanchev 928b7804c8 Add example of explicit handler method registration
Issue: SPR-16336
2018-06-12 15:23:45 -04:00