| | |
| | | package com.ruoyi.web.test; |
| | | |
| | | import com.smartor.config.RabbitMqConfig; |
| | | import org.junit.Test; |
| | | import org.springframework.amqp.rabbit.core.RabbitTemplate; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | |
| | | //@SpringBootTest |
| | | //@RunWith(SpringRunner.class) |
| | | public class MQTest { |
| | | @Autowired |
| | | private RabbitTemplate rabbitTemplate; |
| | | |
| | | |
| | | @Test |
| | | public void testSend() { |
| | | // rabbitTemplate.convertAndSend(RabbitMqConfig.EXCHANGE_NAME, "phone.001", "测试数据001"); |
| | | // rabbitTemplate.convertAndSend(RabbitMqConfig.EXCHANGE_NAME, "phone.002", "测试数据002"); |
| | | // rabbitTemplate.convertAndSend(RabbitMqConfig.EXCHANGE_NAME, "phone.003", "测试数据003"); |
| | | public void testSend22() { |
| | | |
| | | } |
| | | |
| | | |
| | | } |