| | |
| | | package com.ruoyi.web.test; |
| | | |
| | | import com.smartor.config.RabbitMqConfig; |
| | | import com.ruoyi.web.task.PhoneTask; |
| | | 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; |
| | | import java.util.concurrent.ExecutorService; |
| | | import java.util.concurrent.Executors; |
| | | |
| | | //@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"); |
| | | String str = "absdf"; |
| | | String c = Character.toUpperCase(str.charAt(0)) + str.substring(1); |
| | | System.out.println(c); |
| | | "您好,我是浙二医院张医生,您是${name}吗?还是家属?".replaceAll("$$*variable", "AA"); |
| | | // Pattern pattern = Pattern.compile("^(?!.*(好|太好)).*$"); |
| | | // Matcher matcher = pattern.matcher("睡眠不好"); |
| | | // System.out.println(matcher.matches()); |
| | | // 创建固定大小的线程池 |
| | | // ExecutorService executorService = Executors.newFixedThreadPool(10); |
| | | // |
| | | // executorService.submit(new PhoneTask()); |
| | | } |
| | | } |