Support SendTo at class-level
Issue: SPR-13578
This commit is contained in:
@@ -2796,6 +2796,9 @@ as follow to automatically send a response:
|
||||
}
|
||||
----
|
||||
|
||||
TIP: If you have several `@JmsListener`-annotated methods, you can also place the `@SendTo`
|
||||
annotation at class-level to share a default reply destination.
|
||||
|
||||
If you need to set additional headers in a transport-independent manner, you could return a
|
||||
`Message` instead, something like:
|
||||
|
||||
|
||||
@@ -1359,7 +1359,8 @@ The return value from an `@MessageMapping` method is converted with a
|
||||
of a new message that is then sent, by default, to the `"brokerChannel"` with
|
||||
the same destination as the client message but using the prefix `"/topic"` by
|
||||
default. An `@SendTo` message level annotation can be used to specify any
|
||||
other destination instead.
|
||||
other destination instead. It can also be set a class-level to share a common
|
||||
destination.
|
||||
|
||||
An `@SubscribeMapping` annotation can also be used to map subscription requests
|
||||
to `@Controller` methods. It is supported on the method level, but can also be
|
||||
|
||||
@@ -650,12 +650,20 @@ Spring 4.3 also improves the caching abstraction as follows:
|
||||
* `ConcurrentMapCacheManager` and `ConcurrentMapCache` now support the serialization
|
||||
of cache entries via a new `storeByValue` attribute.
|
||||
|
||||
=== JMS Improvements
|
||||
|
||||
* `@SendTo` can now be specified at class-level to share a common reply destination.
|
||||
|
||||
=== Web Improvements
|
||||
|
||||
* New `@RestControllerAdvice` annotation combines `@ControllerAdvice` with `@ResponseBody`.
|
||||
* `@ResponseStatus` can be used on a controller type is inherited for all method.
|
||||
* `AsyncRestTemplate` supports request interception.
|
||||
|
||||
=== WebSocket Messaging Improvements
|
||||
|
||||
* `@SendTo` can now be specified at class-level to share a common destination.
|
||||
|
||||
=== Testing Improvements
|
||||
|
||||
* The JUnit support in the _Spring TestContext Framework_ now requires JUnit 4.12 or higher.
|
||||
|
||||
Reference in New Issue
Block a user