【发布时间】:2016-09-06 22:41:35
【问题描述】:
我正在尝试使用以下代码从 Amazon SQS 接收消息属性:
Map<String, com.amazonaws.services.sqs.model.MessageAttributeValue> attributes = new HashMap<String, com.amazonaws.services.sqs.model.MessageAttributeValue>();
attributes = message.getMessageAttributes();
for(String key: attributes.keySet()){
System.out.println(key + " - "+ attributes.get(key));
}
它返回输出:
project - {StringValue: 25,StringListValues: [],BinaryListValues: [],DataType: String}
我只想获得值 25。我该怎么做?
【问题讨论】:
标签: java string amazon-web-services dictionary key