935090232@qq.com
2021-10-20 240b9fb99d759c0a40d9a8f4098ccea8a945db67
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package com.matrix;
 
import com.matrix.component.asyncmessage.AsyncMessageManager;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
 
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
 
/**
 * 测试类示例
 *
 * @author jiangyouyao
 * @email 512061637@qq.com
 * @date 2019年2月25日
 */
@RunWith(SpringRunner.class)
@SpringBootTest(classes = {ZqErpApplication.class}, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
public class TesatAsyncMessage {
 
 
    @Autowired
    AsyncMessageManager asyncMessageManager;
 
    @Test
    public void test() throws IOException {
 
        Map<String, Object> param =new HashMap<>();
        param.put("test","123");
        asyncMessageManager.sendMsg("testkey",param);
        asyncMessageManager.sendMsg("testkey","test=%s","123456");
 
 
    }
 
 
 
}