Add 4.2 section to the reference

This commit is contained in:
Rossen Stoyanchev
2015-05-20 16:43:01 -04:00
parent 1ba0625cd9
commit af67bd944b

View File

@@ -336,7 +336,7 @@ method has been added.
support (based on Groovy 2.3). See the `GroovyMarkupConfigurer` and respecitve support (based on Groovy 2.3). See the `GroovyMarkupConfigurer` and respecitve
`ViewResolver` and `View' implementations. `ViewResolver` and `View' implementations.
=== WebSocket STOMP Messaging Improvements === WebSocket Messaging Improvements
* SockJS (Java) client-side support. See `SockJsClient` and classes in same package. * SockJS (Java) client-side support. See `SockJsClient` and classes in same package.
* New application context events `SessionSubscribeEvent` and `SessionUnsubscribeEvent` published * New application context events `SessionSubscribeEvent` and `SessionUnsubscribeEvent` published
@@ -386,3 +386,48 @@ method has been added.
was added to make it easy to apply Spring Security setup but can be used to encapsulate was added to make it easy to apply Spring Security setup but can be used to encapsulate
common setup for any 3rd party framework or within a project. common setup for any 3rd party framework or within a project.
* `MockRestServiceServer` now supports the `AsyncRestTemplate` for client-side testing. * `MockRestServiceServer` now supports the `AsyncRestTemplate` for client-side testing.
[[new-in-4.2]]
== New Features and Enhancements in Spring Framework 4.2
=== Web Improvements
* HTTP Streaming and Server-Sent Events support, see <<mvc-ann-async-http-streaming>>.
* Built-in support for CORS including global (MVC Java config) and local (e.g. `@CrossOrigin`) configuration.
* HTTP caching updates:
** new `CacheControl` builder; plug into `WebContentGenerator`, `ResourceHttpRequestHandler`, `ResponseEntity`.
** improved ETag/Last-Modified support in `WebRequest`.
* JavaScript view templating built on Nashorn and JDK 1.8, see `ScriptTemplateViewResolver`.
* Custom `@RequestMapping` annotations.
* Public methods in `AbstractHandlerMethodMapping` to register and unregister request mappings at runtime.
* New `RequestBodyAdvice` extension point and a built-in implementation to support Jackson's `@JsonView`
on`@RequestBody` method arguments.
* `HandlerMethod` as a method argument on `@ExceptionHandler` methods, especially
handy in `@ControllerAdvice` components.
* `java.util.concurrent.CompletableFuture` as an @Controller method return value type.
* Byte-range request support in `HttpHeaders` and for serving static resource.
* `@ResponseStatus` detected on nested exceptions.
* `UriTemplateHandler` extension point in the RestTemplate.
** `DefaultUriTemplateHandler` exposes "baseUrl" property and path segment encoding options.
** the extension point can also be used to plug any URI template library.
* http://square.github.io/okhttp/[OkHTTP] integration with the RestTemplate.
* Custom "baseUrl" alternative for methods in MvcUriComponentsBuilder.
=== WebSocket Messaging Improvements
* Expose presence information about connected users and subscriptions:
** new `SimpUserRegistry` exposed as a bean named "userRegistry".
** sharing of presence information across cluster of servers (see broker relay config options).
* Resolve user destinations across cluster of servers (see broker relay config options).
* `StompSubProtocolErrorHandler` extension point to customize and control STOMP ERROR frames to clients.
* Global `@MessageExceptionHandler` methods via `@ControllerAdvice` components.
* Heart-beats and a SpEL expression 'selector' header for subscriptions with `SimpleBrokerMessageHandler`.
* STOMP client for use over TCP and WebSocket, see <<websocket-stomp-client>>.
* `@SendTo` and `@SendToUser` can contain destination variable placeholders.
* Jackson's `@JsonView` supported for return values on `@MessageMapping` and `@SubscribeMapping` methods.
* `ListenableFuture` and `CompletableFuture` as return value types from
`@MessageMapping` and `@SubscribeMapping` methods.
* `MarshallingMessageConverter` for XML payloads.