来自 Kafak 的消费消息在 spring-xd 中打印为数字
Consumed messages from Kafak is printed as numbers in spring-xd
我正在尝试做一个简单的 spring-xd
实验。
Spring-xd
下载,运行单节点模式。我们已经有了一个 Kafka
集群,并且我们有一个 spark streaming
作业可以从 Twitter API 读取推文并将其推送到 Kafka
.
我正在尝试使用 spring-xd
从 Kafka
读取并写入文件,因此我创建了以下流
xd:>stream create tweet --definition "kafka --zkconnect=zkserver:2181 --topic=tweets | file" --deploy
输出文件中的结果将如下所示
123,34,105,100,34,58,34,116,97,103,58,115,101,97,114,99,104,46,116,119,105,116,116,101,114,46,99,111,109,44,50,48,48,53,58,55,54,54,48,55,55,56,57,52,50,51,55,57,55,48,52,51,50,34,44,34,111,98,106,101,99,116,84,121,112,101,34,58,34,97,99,116,105,118,105,116,121,34,44,34,97,99,116,111,114,34,58,123,34,111,98,106,101,99,116,84,121,112,101,34,58,34,112,101,114,115,111,110,34,44,34,105,100,34,58,34,105,100,58,116,119,105,116,116,101,114,46,99,111,109,58,50,56,49,54,51,54,52,57,52,55,34,44,34,108,105,110,107,34,58,34,104,116,116,112,58,47,47,119,119,119,46,116,119,105,116,116,101,114,46,99,111,109,47,67,82,82,111,103,101,114,115,53,34,44,34,100,105,115,112,108,97,121,78,97,109,101,34,58,34,71,50,32,67,104,97,114,108,105,101,34,44,34,112,111,115,116,101,100,84,105,109,101,34,58,34,50,48,49,52,45,49,48,45,48,56,84,50,49,58,52,54,58,50,56,46,48,48,48,90,34,44,34,105,109,97,103,101,34,58,34,104,116,116,112,115,58,47,47,112,98,115,46,116,119,105,109,103,46,99,111,109,47,112,114,111,102,105,108,101,95,105,109,97,103,101,115,47,55,51,49,50,55,53,53,55,50,56,49,53,53,51,50,48,51,50,47,89,84,66,109,89,113,78,111,95,110,111,114,109,97,108,46,106,112,103,34,44,34,115,117,109,109,97,114,121,34,58,110,117,108,108,44,34,108,105,110,107,115,34,58,91,123,34,104,114,101,102,34,58,110,117,108,108,44,34,114,101,108,34,58,34,109,101,34,125,93,44,34,102,114,105,101,110,100,115,67,111,117,110,116,34,58,55,49,50,44,34,102,111,108,108,111,119,101,114,115,67,111,117,110,116,34,58,52,57,52,44,34,108,105,115,116,101,100,67,111,117,110,116,34,58,54,48,44,34,115,116,97,116,117,115,101,115,67,111,117,110,116,34,58,51,57,53,50,53,44,34,116,119,105,116,116,101,114,84,105,109,101,90,111,110,101,34,58,34,69,97,115,116,101,114,110,32,84,105,109,101,32,40,85,83,32,38,32,67,97,110,97,100,97,41,34,44,34,118,101,114,105,102,105,101,100,34,58,102,97,108,115,101,44,34,117,116,99,79,102,102,115,101,116,34,58,34,45,49,52,52,48,48,34,44,34,112,114,101,102,101,114,114,101,100,85,115,101,114,110,97,109,101,34,58,34,67,82,82,111,103,101,114,115,53,34,44,34,108,97,110,103,117,97,103,101,115,34,58,91,34,101,110,34,93,44,34,108,111,99,97,116,105,111,110,34,58,123,34,111,98,106,101,99,116,84,121,112,101,34,58,34,112,108,97,99,101,34,44,34,100,105,115,112,108,97,121,78,97,109,101,34,58,34,67,84,34,125,44,34,102,97,118,111,114,105,116,101,115,67,111,117,110,116,34,58,51,53,57,125,44,34,118,101,114,98,34,58,34,115,104,97,114,101,34,44,34,112,111,115,116,101,100,84,105,109,101,34,58,34,50,48,49,54,45,48,56,45,49,56,84,48,52,58,48,50,58,53,55,46,48,48,48,90,34,44,34,103,101,110,101,114,97,116,111,114,34,58,123,34,100,105,115,112,108,97,121,78,97,109,101,34,58,34,84,119,105,116,116,101,114,32,102,111,114,32,105,80,104,111,110,101,34,44,34,108,105,110,107,34,58,34,104,116,116,112,58,47,47,116,119,105,116,116,101,114,46,99,111,109,47,100,111,119,110,108,111,97,100,47,105,112,104,111,110,101,34,125,44,34,112,114,111,118,105,100,101,114,34,58,123,34,111,98,106,101,99,116,84,121,112,101,34,58,34,115,101,114,118,105,99,101,34,44,34,100,105,115,112,108,97,121,78,97,109,101,34,58,34,84,119,105,116,116,101,114,34,44,34,108,105,110,107,34,58,34,104,116,116,112,58,47,47,119,119,119,46,116,119,105,116,116,101,114,46,99,111,109,34,125,44,34,108,105,110,107,34,58,34,104,116,116,112,58,47,47,116,119,105,116,116,101,114,46,99,111,109,47,67,82,82,111,103,101,114,115,53,47,115,116,97,116,117,115,101,115,47,55,54,54,48,55,55,56,57,52,50,51,55,57,55,48,52,51,50,34,44,34,98,111,100,121,34,58,34,82,84,32,64,115,116,101,112,104,57,51,48,54,53,58,32,78,101,119,116,58,32,84,114,117,109,112,32,73,83,73,83,32,83,112,101,101,99,104,32,39,72,105,115,116,111,114,105,99,39,32,45,32,39,77,111,115,116,32,73,109,112,111,114,116,97,110,116,32,70,111,114,101,105,103,110,32,80,111,108,105,99,121,32,83,112,101,101,99,104,32,83,105,110,99,101,32,82,111,110,97,108,100,32,82,101,97,103,97,110,39,32,45,32,66,114,101,105,116,98,97,114,116,32,104,116,116,112,115,58,47,47,116,46,99,111,47,50,105,-30,-128,-90,34,44,34,111,98,106,101,99,116,34,58,123,34,105,100,34,58,34,116,97,103,58,115,101,97,114,99,104,46,116,119,105,116,116,101,114,46,99,111,109,44,50,48,48,53,58,55,54,53,53,53,50,56,57,54,51,56,53,52,56,50,55,53,50,34,44,34,111,98,106,101,99,116,84,121,112,101,34,58,34,97,99,116,105,118,105,116,121,34,44,34,97,99,116,111,114,34,58,123,34,111,98,106,101,99,116,84,121,112,101,34,58,34,112,101,114,115,111,110,34,44,34,105,100,34,58,34,105,100,58,116,119,105,116,116,101,114,46,99,111,109,58,50,54,49,55,52,57,55,51,53,34,44,34,108,105,110,107,34,58,34,104,116,116,112,58,47,47,119,119,119,46,116,119,105,116,116,101,114,46,99,111,109,47,115,116,101,112,104,57,51,48,54,53,34,44,34,100,105,115,112,108,97,121,78,97,109,101,34,58,34,83,116,101,112,104,34,44,34,112,111,115,116,101,100,84,105,109,101,34,58,34,50,48,49,49,45,48,51,45,48,54,84,49,57,58,51,54,58,52,52,46,48,48,48,90,34,44,34,105,109,97,103,101,34,58,34,104,116,116,112,115,58,47,47,112,98,115,46,116,119,105,109,103,46,99,111,109,47,112,114,111,102,105,108,101,95,105,109,97,103,101,115,47,55,53,49,53,55,49,50,54,49,50,55,55,52,49,51,51,55,54,47,86,110,114,119,50,75,55,109,95,110,111,114,109,97,108,46,106,112,103,34,44,34,115,117,109,109,97,114,121,34,58,34,65,109,101,114,105,99,97,32,70,105,114,115,116,32,35,84,114,117,109,112,50,48,49,54,32,35,87,111,109,101,110,102,111,114,84,114,117,109,112,32,35,67,65,102,111,114,84,114,117,109,112,34,44,34,108,105,110,107,115,34,58,91,123,34,104,114,101,102,34,58,34,104,116,116,112,115,58,47,47,119,119,119,46,108,121,105,110,103,99,114,111,111,107,101,100,104,105,108,108,97,114,121,46,99,111,109,47,34,44,34,114,101,108,34,58,34,109,101,34,125,93,44,34,102,114,105,101,110,100,115,67,111,117,110,116,34,58,57,54,51,48,53,44,34,102,111,108,108,111,119,101,114,115,67,111,117,110,116,34,58,49,50,55,57,52,55,44,34,108,105,115,116,101,100,67,111,117,110,116,34,58,49,48,53,49,44,34,115,116,97,116,117,115,101,115,67,111,117,110,116,34,58,50,51,51,54,48,51,44,34,116,119,105,116,116,101,114,84,105,109,101,90,111,110,101,34,58,34,65,114,105,122,111,110,97,34,44,34,118,101,114,105,102,105,101,100,34,58,102,97,108,115,101,44,34,117,116,99,79,102,102,115,101,116,34,58,34,45,50,53,50,48,48,34,44,34,112,114,101,102,101,114,114,101,100,85,115,101,114,110,97,109,101,34,58,34,115,116,101,112,104,57,51,48,54,53,34,44,34,108,97,110,103,117,97,103,101,115,34,58,91,34,101,110,34,93,44,34,108,111,99,97,116,105,111,110,34,58,123,34,111,98,106,101,99,116,84,121,112,101,34,58,34,112,108,97,99,101,34,44,34,100,105,115,112,108,97,121,78,97,109,101,34,58,34,67,97,108,105,102,111,114,110,105,97,44,32,85,83,65,34,125,44,34,102,97,118,111,114,105,116,101,115,67,111,117,110,116,34,58,49,55,51,55,52,56,125,44,34,118,101,114,98,34,58,34,112,111,115,116,34,44,34,112,111,115,116,101,100,84,105,109,101,34,58,34,50,48,49,54,45,48,56,45,49,54,84,49,55,58,49,54,58,52,56,46,48,48,48,90,34,44,34,103,101,110,101,114,97,116,111,114,34,58,123,34,100,105,115,112,108,97,121,78,97,109,101,34,58,34,77,111,98,105,108,101,32,87,101,98,34,44,34,108,105,110,107,34,58,34,104,116,116,112,58,47,47,109,111,98,105,108,101,46,116,119,105,116,116,101,114,46,99,111,109,34,125,44,34,112,114,111,118,105,100,101,114,34,58,123,34,111,98,106,101,99,116,84,121,112,101,34,58,34,115,101,114,118,105,99,101,34,44,34,100,105,115,112,108,97,121,78,97,109,101,34,58,34,84,119,105,116,116,101,114,34,44,34,108,105,110,107,34,58,34,104,116,116,112,58,47,47,119,119,119,46,116,119,105,116,116,101,114,46,99,111,109,34,125,44,34,108,105,110,107,34,58,34,104,116,116,112,58,47,47,116,119,105,116,116,101,114,46,99,111,109,47,115,116,101,112,104,57,51,48,54,53,47,115,116,97,116,117,115,101,115,47,55,54,53,53,53,50,56,57,54,51,56,53,52,56,50,55,53,50,34,44,34,98,111,100,121,34,58,34,78,101,119,116,58,32,84,114,117,109,112,32,73,83,73,83,32,83,112,101,101,99,104,32,39,72,105,115,116,111,114,105,99,39,32,45,32,39,77,111,115,116,32,73,109,112,111,114,116,97,110,116,32,70,111,114,101,105,103,110,32,80,111,108,105,99,121,32,83,112,101,101,99,104,32,83,105,110,99,101,32,82,111,110,97,108,100,32,82,101,97,103,97,110,39,32,45,32,66,114,101,105,116,98,97,114,116,32,104,116,116,112,115,58,47,47,116,46,99,111,47,50,105,119,54,56,79,119,56,73,118,34,44,34,111,98,106,101,99,116,34,58,123,34,111,98,106,101,99,116,84,121,112,101,34,58,34,110,111,116,101,34,44,34,105,100,34,58,34,111,98,106,101,99,116,58,115,101,97,114,99,104,46,116,119,105,116,116,101,114,46,99,111,109,44,50,48,48,53,58,55,54,53,53,53,50,56,57,54,51,56,53,52,56,50,55,53,50,34,44,34,115,117,109,109,97,114,121,34,58,34,78,101,119,116,58,32,84,114,117,109,112,32,73,83,73,83,32,83,112,101,101,99,104,32,39,72,105,115,116,111,114,105,99,39,32,45,32,39,77,111,115,116,32,73,109,112,111,114,116,97,110,116,32,70,111,114,101,105,103,110,32,80,111,108,105,99,121,32,83,112,101,101,99,104,32,83,105,110,99,101,32,82,111,110,97,108,100,32,82,101,97,103,97,110,39,32,45,32,66,114,101,105,116,98,97,114,116,32,104,116,116,112,115,58,47,47,116,46,99,111,47,50,105,119,54,56,79,119,56,73,118,34,44,34,108,105,110,107,34,58,34,104,116,116,112,58,47,47,116,119,105,116,116,101,114,46,99,111,109,47,115,116,101,112,104,57,51,48,54,53,47,115,116,97,116,117,115,101,115,47,55,54,53,53,53,50,56,57,54,51,56,53,52,56,50,55,53,50,34,44,34,112,111,115,116,101,100,84,105,109,101,34,58,34,50,48,49,54,45,48,56,45,49,54,84,49,55,58,49,54,58,52,56,46,48,48,48,90,34,125,44,34,102,97,118,111,114,105,116,101,115,67,111,117,110,116,34,58,48,44,34,116,119,105,116,116,101,114,95,101,110,116,105,116,105,101,115,34,58,123,34,104,97,115,104,116,97,103,115,34,58,91,93,44,34,117,115,101,114,95,109,101,110,116,105,111,110,115,34,58,91,93,44,34,115,121,109,98,111,108,115,34,58,91,93,44,34,117,114,108,115,34,58,91,123,34,117,114,108,34,58,34,104,116,116,112,115,58,47,47,116,46,99,111,47,50,105,119,54,56,79,119,56,73,118,34,44,34,101,120,112,97,110,100,101,100,95,117,114,108,34,58,34,104,116,116,112,58,47,47,98,105,116,46,108,121,47,50,98,117,55,48,81,87,34,44,34,100,105,115,112,108,97,121,95,117,114,108,34,58,34,98,105,116,46,108,121,47,50,98,117,55,48,81,87,34,44,34,105,110,100,105,99,101,115,34,58,91,49,48,56,44,49,51,49,93,125,93,125,44,34,116,119,105,116,116,101,114,95,102,105,108,116,101,114,95,108,101,118,101,108,34,58,34,108,111,119,34,44,34,116,119,105,116,116,101,114,95,108,97,110,103,34,58,34,101,110,34,125,44,34,102,97,118,111,114,105,116,101,115,67,111,117,110,116,34,58,48,44,34,116,119,105,116,116,101,114,95,101,110,116,105,116,105,101,115,34,58,123,34,104,97,115,104,116,97,103,115,34,58,91,93,44,34,117,115,101,114,95,109,101,110,116,105,111,110,115,34,58,91,123,34,115,99,114,101,101,110,95,110,97,109,101,34,58,34,115,116,101,112,104,57,51,48,54,53,34,44,34,110,97,109,101,34,58,34,83,116,101,112,104,34,44,34,105,100,34,58,50,54,49,55,52,57,55,51,53,44,34,105,100,95,115,116,114,34,58,34,50,54,49,55,52,57,55,51,53,34,44,34,105,110,100,105,99,101,115,34,58,91,51,44,49,52,93,125,93,44,34,115,121,109,98,111,108,115,34,58,91,93,44,34,117,114,108,115,34,58,91,123,34,117,114,108,34,58,34,104,116,116,112,115,58,47,47,116,46,99,111,47,50,105,119,54,56,79,119,56,73,118,34,44,34,101,120,112,97,110,100,101,100,95,117,114,108,34,58,34,104,116,116,112,58,47,47,98,105,116,46,108,121,47,50,98,117,55,48,81,87,34,44,34,100,105,115,112,108,97,121,95,117,114,108,34,58,34,98,105,116,46,108,121,47,50,98,117,55,48,81,87,34,44,34,105,110,100,105,99,101,115,34,58,91,49,50,52,44,49,52,48,93,125,93,125,44,34,116,119,105,116,116,101,114,95,102,105,108,116,101,114,95,108,101,118,101,108,34,58,34,108,111,119,34,44,34,116,119,105,116,116,101,114,95,108,97,110,103,34,58,34,101,110,34,44,34,114,101,116,119,101,101,116,67,111,117,110,116,34,58,48,44,34,103,110,105,112,34,58,123,34,109,97,116,99,104,105,110,103,95,114,117,108,101,115,34,58,91,123,34,116,97,103,34,58,34,105,115,105,115,69,110,103,108,105,115,104,79,110,108,121,86,56,34,125,44,123,34,116,97,103,34,58,34,73,83,73,83,69,110,103,108,105,115,104,79,110,108,121,118,50,34,125,44,123,34,116,97,103,34,58,34,73,83,73,83,69,110,103,108,105,115,104,118,50,34,125,44,123,34,116,97,103,34,58,34,73,83,73,83,69,110,103,108,105,115,104,79,110,108,121,118,51,34,125,44,123,34,116,97,103,34,58,34,105,115,105,115,69,110,103,108,105,115,104,79,110,108,121,86,55,80,97,114,116,49,34,125,44,123,34,116,97,103,34,58,34,105,115,105,115,69,110,103,108,10
这个结果有什么解释吗?
您的输出看起来像一个字符数组。如果你拿拳头数字并翻译它们,你可以看到这是一个 JSON 字符串的代码数组。
123 34 105 100 34 58 34 116 97 103 58 115 101 97 114 99 104 46...
转换为:
{"id":"tag:search...
我相信这里已经回答了这个问题:
Spring XD: "tcp" source outputs byte array instead of string? How to output regular text?
我正在尝试做一个简单的 spring-xd
实验。
Spring-xd
下载,运行单节点模式。我们已经有了一个 Kafka
集群,并且我们有一个 spark streaming
作业可以从 Twitter API 读取推文并将其推送到 Kafka
.
我正在尝试使用 spring-xd
从 Kafka
读取并写入文件,因此我创建了以下流
xd:>stream create tweet --definition "kafka --zkconnect=zkserver:2181 --topic=tweets | file" --deploy
输出文件中的结果将如下所示
123,34,105,100,34,58,34,116,97,103,58,115,101,97,114,99,104,46,116,119,105,116,116,101,114,46,99,111,109,44,50,48,48,53,58,55,54,54,48,55,55,56,57,52,50,51,55,57,55,48,52,51,50,34,44,34,111,98,106,101,99,116,84,121,112,101,34,58,34,97,99,116,105,118,105,116,121,34,44,34,97,99,116,111,114,34,58,123,34,111,98,106,101,99,116,84,121,112,101,34,58,34,112,101,114,115,111,110,34,44,34,105,100,34,58,34,105,100,58,116,119,105,116,116,101,114,46,99,111,109,58,50,56,49,54,51,54,52,57,52,55,34,44,34,108,105,110,107,34,58,34,104,116,116,112,58,47,47,119,119,119,46,116,119,105,116,116,101,114,46,99,111,109,47,67,82,82,111,103,101,114,115,53,34,44,34,100,105,115,112,108,97,121,78,97,109,101,34,58,34,71,50,32,67,104,97,114,108,105,101,34,44,34,112,111,115,116,101,100,84,105,109,101,34,58,34,50,48,49,52,45,49,48,45,48,56,84,50,49,58,52,54,58,50,56,46,48,48,48,90,34,44,34,105,109,97,103,101,34,58,34,104,116,116,112,115,58,47,47,112,98,115,46,116,119,105,109,103,46,99,111,109,47,112,114,111,102,105,108,101,95,105,109,97,103,101,115,47,55,51,49,50,55,53,53,55,50,56,49,53,53,51,50,48,51,50,47,89,84,66,109,89,113,78,111,95,110,111,114,109,97,108,46,106,112,103,34,44,34,115,117,109,109,97,114,121,34,58,110,117,108,108,44,34,108,105,110,107,115,34,58,91,123,34,104,114,101,102,34,58,110,117,108,108,44,34,114,101,108,34,58,34,109,101,34,125,93,44,34,102,114,105,101,110,100,115,67,111,117,110,116,34,58,55,49,50,44,34,102,111,108,108,111,119,101,114,115,67,111,117,110,116,34,58,52,57,52,44,34,108,105,115,116,101,100,67,111,117,110,116,34,58,54,48,44,34,115,116,97,116,117,115,101,115,67,111,117,110,116,34,58,51,57,53,50,53,44,34,116,119,105,116,116,101,114,84,105,109,101,90,111,110,101,34,58,34,69,97,115,116,101,114,110,32,84,105,109,101,32,40,85,83,32,38,32,67,97,110,97,100,97,41,34,44,34,118,101,114,105,102,105,101,100,34,58,102,97,108,115,101,44,34,117,116,99,79,102,102,115,101,116,34,58,34,45,49,52,52,48,48,34,44,34,112,114,101,102,101,114,114,101,100,85,115,101,114,110,97,109,101,34,58,34,67,82,82,111,103,101,114,115,53,34,44,34,108,97,110,103,117,97,103,101,115,34,58,91,34,101,110,34,93,44,34,108,111,99,97,116,105,111,110,34,58,123,34,111,98,106,101,99,116,84,121,112,101,34,58,34,112,108,97,99,101,34,44,34,100,105,115,112,108,97,121,78,97,109,101,34,58,34,67,84,34,125,44,34,102,97,118,111,114,105,116,101,115,67,111,117,110,116,34,58,51,53,57,125,44,34,118,101,114,98,34,58,34,115,104,97,114,101,34,44,34,112,111,115,116,101,100,84,105,109,101,34,58,34,50,48,49,54,45,48,56,45,49,56,84,48,52,58,48,50,58,53,55,46,48,48,48,90,34,44,34,103,101,110,101,114,97,116,111,114,34,58,123,34,100,105,115,112,108,97,121,78,97,109,101,34,58,34,84,119,105,116,116,101,114,32,102,111,114,32,105,80,104,111,110,101,34,44,34,108,105,110,107,34,58,34,104,116,116,112,58,47,47,116,119,105,116,116,101,114,46,99,111,109,47,100,111,119,110,108,111,97,100,47,105,112,104,111,110,101,34,125,44,34,112,114,111,118,105,100,101,114,34,58,123,34,111,98,106,101,99,116,84,121,112,101,34,58,34,115,101,114,118,105,99,101,34,44,34,100,105,115,112,108,97,121,78,97,109,101,34,58,34,84,119,105,116,116,101,114,34,44,34,108,105,110,107,34,58,34,104,116,116,112,58,47,47,119,119,119,46,116,119,105,116,116,101,114,46,99,111,109,34,125,44,34,108,105,110,107,34,58,34,104,116,116,112,58,47,47,116,119,105,116,116,101,114,46,99,111,109,47,67,82,82,111,103,101,114,115,53,47,115,116,97,116,117,115,101,115,47,55,54,54,48,55,55,56,57,52,50,51,55,57,55,48,52,51,50,34,44,34,98,111,100,121,34,58,34,82,84,32,64,115,116,101,112,104,57,51,48,54,53,58,32,78,101,119,116,58,32,84,114,117,109,112,32,73,83,73,83,32,83,112,101,101,99,104,32,39,72,105,115,116,111,114,105,99,39,32,45,32,39,77,111,115,116,32,73,109,112,111,114,116,97,110,116,32,70,111,114,101,105,103,110,32,80,111,108,105,99,121,32,83,112,101,101,99,104,32,83,105,110,99,101,32,82,111,110,97,108,100,32,82,101,97,103,97,110,39,32,45,32,66,114,101,105,116,98,97,114,116,32,104,116,116,112,115,58,47,47,116,46,99,111,47,50,105,-30,-128,-90,34,44,34,111,98,106,101,99,116,34,58,123,34,105,100,34,58,34,116,97,103,58,115,101,97,114,99,104,46,116,119,105,116,116,101,114,46,99,111,109,44,50,48,48,53,58,55,54,53,53,53,50,56,57,54,51,56,53,52,56,50,55,53,50,34,44,34,111,98,106,101,99,116,84,121,112,101,34,58,34,97,99,116,105,118,105,116,121,34,44,34,97,99,116,111,114,34,58,123,34,111,98,106,101,99,116,84,121,112,101,34,58,34,112,101,114,115,111,110,34,44,34,105,100,34,58,34,105,100,58,116,119,105,116,116,101,114,46,99,111,109,58,50,54,49,55,52,57,55,51,53,34,44,34,108,105,110,107,34,58,34,104,116,116,112,58,47,47,119,119,119,46,116,119,105,116,116,101,114,46,99,111,109,47,115,116,101,112,104,57,51,48,54,53,34,44,34,100,105,115,112,108,97,121,78,97,109,101,34,58,34,83,116,101,112,104,34,44,34,112,111,115,116,101,100,84,105,109,101,34,58,34,50,48,49,49,45,48,51,45,48,54,84,49,57,58,51,54,58,52,52,46,48,48,48,90,34,44,34,105,109,97,103,101,34,58,34,104,116,116,112,115,58,47,47,112,98,115,46,116,119,105,109,103,46,99,111,109,47,112,114,111,102,105,108,101,95,105,109,97,103,101,115,47,55,53,49,53,55,49,50,54,49,50,55,55,52,49,51,51,55,54,47,86,110,114,119,50,75,55,109,95,110,111,114,109,97,108,46,106,112,103,34,44,34,115,117,109,109,97,114,121,34,58,34,65,109,101,114,105,99,97,32,70,105,114,115,116,32,35,84,114,117,109,112,50,48,49,54,32,35,87,111,109,101,110,102,111,114,84,114,117,109,112,32,35,67,65,102,111,114,84,114,117,109,112,34,44,34,108,105,110,107,115,34,58,91,123,34,104,114,101,102,34,58,34,104,116,116,112,115,58,47,47,119,119,119,46,108,121,105,110,103,99,114,111,111,107,101,100,104,105,108,108,97,114,121,46,99,111,109,47,34,44,34,114,101,108,34,58,34,109,101,34,125,93,44,34,102,114,105,101,110,100,115,67,111,117,110,116,34,58,57,54,51,48,53,44,34,102,111,108,108,111,119,101,114,115,67,111,117,110,116,34,58,49,50,55,57,52,55,44,34,108,105,115,116,101,100,67,111,117,110,116,34,58,49,48,53,49,44,34,115,116,97,116,117,115,101,115,67,111,117,110,116,34,58,50,51,51,54,48,51,44,34,116,119,105,116,116,101,114,84,105,109,101,90,111,110,101,34,58,34,65,114,105,122,111,110,97,34,44,34,118,101,114,105,102,105,101,100,34,58,102,97,108,115,101,44,34,117,116,99,79,102,102,115,101,116,34,58,34,45,50,53,50,48,48,34,44,34,112,114,101,102,101,114,114,101,100,85,115,101,114,110,97,109,101,34,58,34,115,116,101,112,104,57,51,48,54,53,34,44,34,108,97,110,103,117,97,103,101,115,34,58,91,34,101,110,34,93,44,34,108,111,99,97,116,105,111,110,34,58,123,34,111,98,106,101,99,116,84,121,112,101,34,58,34,112,108,97,99,101,34,44,34,100,105,115,112,108,97,121,78,97,109,101,34,58,34,67,97,108,105,102,111,114,110,105,97,44,32,85,83,65,34,125,44,34,102,97,118,111,114,105,116,101,115,67,111,117,110,116,34,58,49,55,51,55,52,56,125,44,34,118,101,114,98,34,58,34,112,111,115,116,34,44,34,112,111,115,116,101,100,84,105,109,101,34,58,34,50,48,49,54,45,48,56,45,49,54,84,49,55,58,49,54,58,52,56,46,48,48,48,90,34,44,34,103,101,110,101,114,97,116,111,114,34,58,123,34,100,105,115,112,108,97,121,78,97,109,101,34,58,34,77,111,98,105,108,101,32,87,101,98,34,44,34,108,105,110,107,34,58,34,104,116,116,112,58,47,47,109,111,98,105,108,101,46,116,119,105,116,116,101,114,46,99,111,109,34,125,44,34,112,114,111,118,105,100,101,114,34,58,123,34,111,98,106,101,99,116,84,121,112,101,34,58,34,115,101,114,118,105,99,101,34,44,34,100,105,115,112,108,97,121,78,97,109,101,34,58,34,84,119,105,116,116,101,114,34,44,34,108,105,110,107,34,58,34,104,116,116,112,58,47,47,119,119,119,46,116,119,105,116,116,101,114,46,99,111,109,34,125,44,34,108,105,110,107,34,58,34,104,116,116,112,58,47,47,116,119,105,116,116,101,114,46,99,111,109,47,115,116,101,112,104,57,51,48,54,53,47,115,116,97,116,117,115,101,115,47,55,54,53,53,53,50,56,57,54,51,56,53,52,56,50,55,53,50,34,44,34,98,111,100,121,34,58,34,78,101,119,116,58,32,84,114,117,109,112,32,73,83,73,83,32,83,112,101,101,99,104,32,39,72,105,115,116,111,114,105,99,39,32,45,32,39,77,111,115,116,32,73,109,112,111,114,116,97,110,116,32,70,111,114,101,105,103,110,32,80,111,108,105,99,121,32,83,112,101,101,99,104,32,83,105,110,99,101,32,82,111,110,97,108,100,32,82,101,97,103,97,110,39,32,45,32,66,114,101,105,116,98,97,114,116,32,104,116,116,112,115,58,47,47,116,46,99,111,47,50,105,119,54,56,79,119,56,73,118,34,44,34,111,98,106,101,99,116,34,58,123,34,111,98,106,101,99,116,84,121,112,101,34,58,34,110,111,116,101,34,44,34,105,100,34,58,34,111,98,106,101,99,116,58,115,101,97,114,99,104,46,116,119,105,116,116,101,114,46,99,111,109,44,50,48,48,53,58,55,54,53,53,53,50,56,57,54,51,56,53,52,56,50,55,53,50,34,44,34,115,117,109,109,97,114,121,34,58,34,78,101,119,116,58,32,84,114,117,109,112,32,73,83,73,83,32,83,112,101,101,99,104,32,39,72,105,115,116,111,114,105,99,39,32,45,32,39,77,111,115,116,32,73,109,112,111,114,116,97,110,116,32,70,111,114,101,105,103,110,32,80,111,108,105,99,121,32,83,112,101,101,99,104,32,83,105,110,99,101,32,82,111,110,97,108,100,32,82,101,97,103,97,110,39,32,45,32,66,114,101,105,116,98,97,114,116,32,104,116,116,112,115,58,47,47,116,46,99,111,47,50,105,119,54,56,79,119,56,73,118,34,44,34,108,105,110,107,34,58,34,104,116,116,112,58,47,47,116,119,105,116,116,101,114,46,99,111,109,47,115,116,101,112,104,57,51,48,54,53,47,115,116,97,116,117,115,101,115,47,55,54,53,53,53,50,56,57,54,51,56,53,52,56,50,55,53,50,34,44,34,112,111,115,116,101,100,84,105,109,101,34,58,34,50,48,49,54,45,48,56,45,49,54,84,49,55,58,49,54,58,52,56,46,48,48,48,90,34,125,44,34,102,97,118,111,114,105,116,101,115,67,111,117,110,116,34,58,48,44,34,116,119,105,116,116,101,114,95,101,110,116,105,116,105,101,115,34,58,123,34,104,97,115,104,116,97,103,115,34,58,91,93,44,34,117,115,101,114,95,109,101,110,116,105,111,110,115,34,58,91,93,44,34,115,121,109,98,111,108,115,34,58,91,93,44,34,117,114,108,115,34,58,91,123,34,117,114,108,34,58,34,104,116,116,112,115,58,47,47,116,46,99,111,47,50,105,119,54,56,79,119,56,73,118,34,44,34,101,120,112,97,110,100,101,100,95,117,114,108,34,58,34,104,116,116,112,58,47,47,98,105,116,46,108,121,47,50,98,117,55,48,81,87,34,44,34,100,105,115,112,108,97,121,95,117,114,108,34,58,34,98,105,116,46,108,121,47,50,98,117,55,48,81,87,34,44,34,105,110,100,105,99,101,115,34,58,91,49,48,56,44,49,51,49,93,125,93,125,44,34,116,119,105,116,116,101,114,95,102,105,108,116,101,114,95,108,101,118,101,108,34,58,34,108,111,119,34,44,34,116,119,105,116,116,101,114,95,108,97,110,103,34,58,34,101,110,34,125,44,34,102,97,118,111,114,105,116,101,115,67,111,117,110,116,34,58,48,44,34,116,119,105,116,116,101,114,95,101,110,116,105,116,105,101,115,34,58,123,34,104,97,115,104,116,97,103,115,34,58,91,93,44,34,117,115,101,114,95,109,101,110,116,105,111,110,115,34,58,91,123,34,115,99,114,101,101,110,95,110,97,109,101,34,58,34,115,116,101,112,104,57,51,48,54,53,34,44,34,110,97,109,101,34,58,34,83,116,101,112,104,34,44,34,105,100,34,58,50,54,49,55,52,57,55,51,53,44,34,105,100,95,115,116,114,34,58,34,50,54,49,55,52,57,55,51,53,34,44,34,105,110,100,105,99,101,115,34,58,91,51,44,49,52,93,125,93,44,34,115,121,109,98,111,108,115,34,58,91,93,44,34,117,114,108,115,34,58,91,123,34,117,114,108,34,58,34,104,116,116,112,115,58,47,47,116,46,99,111,47,50,105,119,54,56,79,119,56,73,118,34,44,34,101,120,112,97,110,100,101,100,95,117,114,108,34,58,34,104,116,116,112,58,47,47,98,105,116,46,108,121,47,50,98,117,55,48,81,87,34,44,34,100,105,115,112,108,97,121,95,117,114,108,34,58,34,98,105,116,46,108,121,47,50,98,117,55,48,81,87,34,44,34,105,110,100,105,99,101,115,34,58,91,49,50,52,44,49,52,48,93,125,93,125,44,34,116,119,105,116,116,101,114,95,102,105,108,116,101,114,95,108,101,118,101,108,34,58,34,108,111,119,34,44,34,116,119,105,116,116,101,114,95,108,97,110,103,34,58,34,101,110,34,44,34,114,101,116,119,101,101,116,67,111,117,110,116,34,58,48,44,34,103,110,105,112,34,58,123,34,109,97,116,99,104,105,110,103,95,114,117,108,101,115,34,58,91,123,34,116,97,103,34,58,34,105,115,105,115,69,110,103,108,105,115,104,79,110,108,121,86,56,34,125,44,123,34,116,97,103,34,58,34,73,83,73,83,69,110,103,108,105,115,104,79,110,108,121,118,50,34,125,44,123,34,116,97,103,34,58,34,73,83,73,83,69,110,103,108,105,115,104,118,50,34,125,44,123,34,116,97,103,34,58,34,73,83,73,83,69,110,103,108,105,115,104,79,110,108,121,118,51,34,125,44,123,34,116,97,103,34,58,34,105,115,105,115,69,110,103,108,105,115,104,79,110,108,121,86,55,80,97,114,116,49,34,125,44,123,34,116,97,103,34,58,34,105,115,105,115,69,110,103,108,10
这个结果有什么解释吗?
您的输出看起来像一个字符数组。如果你拿拳头数字并翻译它们,你可以看到这是一个 JSON 字符串的代码数组。
123 34 105 100 34 58 34 116 97 103 58 115 101 97 114 99 104 46...
转换为:
{"id":"tag:search...
我相信这里已经回答了这个问题:
Spring XD: "tcp" source outputs byte array instead of string? How to output regular text?