gpt4 book ai didi

java - Spring Boot - Stomp : '.' vs '/' in Message Destination

转载 作者:太空宇宙 更新时间:2023-11-04 12:03:13 27 4
gpt4 key购买 nike

我正在构建一个消息系统,并且我正在遵循一些过去的项目和示例来构建它。然而,我注意到一些开发人员使用“.”。和消息目的地声明中的“/”。

我已经测试过制作一个工作模型,当我将一个模型更改为另一个模型时,消息传递要么出现故障,要么给出意外的结果。从断开与其余点的连接到将“一对一”连接变为“多对多”。

我浏览了几份文档试图找到答案,但没有一个提到这一点。

最佳答案

我找到了答案here

26.4.9 Using Dot as Separator in @MessageMapping Destinations

Although slash-separated path patterns are familiar to web developers, in messaging it is common to use a "." as the separator, for example in the names of topics, queues, exchanges, etc. Applications can also switch to using "." (dot) instead of "/" (slash) as the separator in @MessageMapping mappings by configuring a custom AntPathMatcher.

关于java - Spring Boot - Stomp : '.' vs '/' in Message Destination,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40684454/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com