And below is a simple example to illustrate a controller with "." separator:
After that a controller may use dot "." as separator in `@MessageMapping` methods:
[source,java,indent=0]
[subs="verbatim,quotes"]
@ -1712,7 +1714,15 @@ And below is a simple example to illustrate a controller with "." separator:
@@ -1712,7 +1714,15 @@ And below is a simple example to illustrate a controller with "." separator:
}
----
If the application prefix is set to "/app" then the foo method is effectively mapped to "/app/foo.bar.{baz}".
The client can now send a message to `"/app/foo.bar.baz123"`.
In the example above we did not change the prefixes on the "broker relay" because those
depend entirely on the external message broker. Check the STOMP documentation pages of
the broker you're using to see what conventions it supports for the destination header.
The "simple broker" on the other hand does rely on the configured `PathMatcher` so if
you switch the separator that will also apply to the broker and the way matches
destinations from a message to patterns in subscriptions.