| | |
| | | import java.io.InputStreamReader; |
| | | import java.io.UnsupportedEncodingException; |
| | | |
| | | import com.example.springboot.common.MessageSender; |
| | | |
| | | import org.apache.commons.io.FileUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.ApplicationContext; |
| | |
| | | jsonObject.put("key3", jsonArray); |
| | | |
| | | try { |
| | | // 将 JSON 对象转换为字符串并发送到队列 |
| | | RabbitMQUtils.sendJsonMessage(jsonObject, "json_queue"); |
| | | // 将 JSON 对象转换为字符串并发送到队列//RabbitMQUtils.sendJsonMessage(jsonObject, "json_queue"); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |