diff --git a/src/asciidoc/whats-new.adoc b/src/asciidoc/whats-new.adoc index 379430289ea..89d1eef4bca 100644 --- a/src/asciidoc/whats-new.adoc +++ b/src/asciidoc/whats-new.adoc @@ -336,7 +336,7 @@ method has been added. support (based on Groovy 2.3). See the `GroovyMarkupConfigurer` and respecitve `ViewResolver` and `View' implementations. -=== WebSocket STOMP Messaging Improvements +=== WebSocket Messaging Improvements * SockJS (Java) client-side support. See `SockJsClient` and classes in same package. * New application context events `SessionSubscribeEvent` and `SessionUnsubscribeEvent` published @@ -385,4 +385,49 @@ method has been added. * `MockMvcBuilder` _recipes_ can now be created with the help of `MockMvcConfigurer`. This 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. -* `MockRestServiceServer` now supports the `AsyncRestTemplate` for client-side testing. \ No newline at end of file +* `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 <>. +* 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 <>. +* `@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. +