Update WebSocket docs on proxying @Controller

Issue: SPR-13384
This commit is contained in:
Rossen Stoyanchev
2015-08-25 22:14:36 -04:00
parent bdf735125f
commit 4ecb3d4f3f
3 changed files with 23 additions and 0 deletions

View File

@@ -1374,6 +1374,19 @@ Or alternatively an `@SubscribeMapping` method can be annotated with `@SendTo`
in which case the resulting message is sent to the `"brokerChannel"` using
the specified target destination.
[NOTE]
====
In some cases a controller may need to be decorated with an AOP proxy at runtime.
One example is if you choose to have `@Transactional` annotations directly on the
controller. When this is the case, for controllers specifically, we recommend
using class-based proxying. This is typically the default choice with controllers.
However if a controller must implement an interface that is not a Spring Context
callback (e.g. `InitializingBean`, `*Aware`, etc), you may need to explicitly
configure class-based proxying. For example with `<tx:annotation-driven />`,
change to `<tx:annotation-driven proxy-target-class="true" />`.
====
[[websocket-stomp-handle-send]]
=== Sending Messages