| | |
| | | import org.junit.Test; |
| | | import org.springframework.amqp.rabbit.core.RabbitTemplate; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.core.SpringVersion; |
| | | |
| | | import java.util.regex.Matcher; |
| | | import java.util.regex.Pattern; |
| | | |
| | | //@SpringBootTest |
| | | //@RunWith(SpringRunner.class) |
| | |
| | | |
| | | @Test |
| | | public void testSend() { |
| | | |
| | | |
| | | Pattern pattern = Pattern.compile("(?=.*(?:还行|挺好|可以|不错)).*$"); |
| | | Matcher matcher = pattern.matcher("还行吧,就是还有点疼"); |
| | | System.out.println(matcher.matches()); |
| | | System.out.println("Spring Framework版本:" + SpringVersion.getVersion()); |
| | | // rabbitTemplate.convertAndSend(RabbitMqConfig.EXCHANGE_NAME, "phone.001", "测试数据001"); |
| | | // rabbitTemplate.convertAndSend(RabbitMqConfig.EXCHANGE_NAME, "phone.002", "测试数据002"); |
| | | // rabbitTemplate.convertAndSend(RabbitMqConfig.EXCHANGE_NAME, "phone.003", "测试数据003"); |