|
|
@ -65,6 +65,7 @@ public class KafkaController {
|
|
|
|
JSONArray jsonArray=new JSONArray();
|
|
|
|
JSONArray jsonArray=new JSONArray();
|
|
|
|
for (ConsumerRecord<String, String> consumerRecord : records) {
|
|
|
|
for (ConsumerRecord<String, String> consumerRecord : records) {
|
|
|
|
String kfkContent = consumerRecord.value();
|
|
|
|
String kfkContent = consumerRecord.value();
|
|
|
|
|
|
|
|
System.out.println(kfkContent);
|
|
|
|
resultList.add(kfkContent);
|
|
|
|
resultList.add(kfkContent);
|
|
|
|
if (!StringUtils.isEmpty(kfkContent)) {
|
|
|
|
if (!StringUtils.isEmpty(kfkContent)) {
|
|
|
|
jsonArray.add(JSONObject.parseObject(kfkContent));
|
|
|
|
jsonArray.add(JSONObject.parseObject(kfkContent));
|
|
|
|