Skip to content

Conversation

artembilan
Copy link
Member

Related to https://stackoverflow.com/questions/67923303/dynamic-registration-of-websocket-output-adapter-is-not-working

By default the AbstractHandlerMapping comes with the order = Ordered.LOWEST_PRECEDENCE which sorts
added mappings to the end of chain.
At the same time Spring Boot registers a SimpleUrlHandlerMapping as a fallback for all not handled requests
leaving our own mapping behind consideration

  • Add order = 0 to the IntegrationDynamicWebSocketHandlerMapping bean registration to let it to be
    consulted before SimpleUrlHandlerMapping
  • Add a note into web-sockets.adoc that @EnableWebsocket would disable Spring Integration dynamic WebSocket
    endpoints

Related to https://stackoverflow.com/questions/67923303/dynamic-registration-of-websocket-output-adapter-is-not-working

By default the `AbstractHandlerMapping` comes with the `order = Ordered.LOWEST_PRECEDENCE` which sorts
added mappings to the end of chain.
At the same time Spring Boot registers a `SimpleUrlHandlerMapping` as a fallback for all not handled requests
leaving our own mapping behind consideration

* Add `order = 0` to the `IntegrationDynamicWebSocketHandlerMapping` bean registration to let it to be
consulted before `SimpleUrlHandlerMapping`
* Add a note into `web-sockets.adoc` that `@EnableWebsocket` would disable Spring Integration dynamic WebSocket
endpoints
@garyrussell garyrussell merged commit 6ef0798 into spring-projects:main Jun 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants