【发布时间】:2014-06-23 12:18:26
【问题描述】:
我正在使用 Spring 消息传递和 Spring Socket 4.0.5.RELEASE。
我想向代理发送一条纯字符串消息。事实证明,这样的 String 被转义了,例如在服务器端执行以下操作时:
private MessageSendingOperations<String> messagingTemplate;
messagingTemplate.convertAndSend("/app/someendpoint", "This is a String with a quotation mark: \". ");
然后订阅的 STOMP 客户端会收到以下消息:
<<< MESSAGE
content-type:application/json;charset=UTF-8
subscription:sub-0
message-id:l6dvrpro-3
destination:/app/someendpoint
content-length:46
"This is a String with a quotation mark: \". "
因此有效载荷包括引号和转义引号。
如何发送未转义的“正常”字符串?
【问题讨论】:
标签: spring stomp spring-messaging