|
@@ -1,45 +1,26 @@
|
1
|
1
|
package com.gct.tools.etlcamelhuge;
|
2
|
2
|
|
3
|
|
-import com.alibaba.fastjson.JSONArray;
|
4
|
|
-import com.alibaba.fastjson.JSONObject;
|
5
|
|
-import com.gct.tools.etlcamelhuge.entity.GTBody;
|
|
3
|
+import com.gct.tools.etlcamelhuge.MQ.MessageProducer;
|
|
4
|
+import com.gct.tools.etlcamelhuge.entity.DiagnoseMsg;
|
6
|
5
|
import com.gct.tools.etlcamelhuge.routeconfig.CamelJDBCConfiguration;
|
7
|
|
-import com.mysql.cj.log.Log;
|
8
|
|
-import io.micrometer.core.instrument.util.IOUtils;
|
9
|
6
|
import lombok.Data;
|
10
|
|
-import org.apache.camel.AggregationStrategy;
|
11
|
|
-import org.apache.camel.CamelContext;
|
12
|
|
-import org.apache.camel.Exchange;
|
13
|
|
-import org.apache.camel.Processor;
|
14
|
|
-import org.apache.camel.builder.RouteBuilder;
|
15
|
|
-import org.apache.camel.http.common.HttpMessage;
|
16
|
|
-import org.apache.camel.impl.DefaultCamelContext;
|
17
|
|
-import org.apache.camel.model.ModelCamelContext;
|
18
|
7
|
import org.junit.jupiter.api.Test;
|
19
|
8
|
import org.junit.runner.RunWith;
|
20
|
9
|
import org.springframework.beans.factory.annotation.Autowired;
|
21
|
10
|
import org.springframework.boot.test.context.SpringBootTest;
|
22
|
|
-import org.springframework.context.annotation.Bean;
|
23
|
11
|
import org.springframework.test.context.junit4.SpringRunner;
|
24
|
12
|
|
25
|
|
-import java.io.IOException;
|
26
|
|
-import java.io.InputStream;
|
|
13
|
+import javax.annotation.Resource;
|
27
|
14
|
import java.lang.reflect.Array;
|
28
|
15
|
import java.lang.reflect.InvocationTargetException;
|
29
|
|
-import java.text.SimpleDateFormat;
|
30
|
16
|
import java.time.LocalDate;
|
31
|
|
-import java.time.LocalDateTime;
|
32
|
|
-import java.time.ZoneOffset;
|
33
|
17
|
import java.time.format.DateTimeFormatter;
|
34
|
18
|
import java.util.ArrayList;
|
35
|
19
|
import java.util.Arrays;
|
36
|
|
-import java.util.Date;
|
37
|
20
|
import java.util.List;
|
38
|
21
|
|
39
|
|
-import static org.junit.Assert.assertEquals;
|
40
|
|
-
|
41
|
22
|
@RunWith(SpringRunner.class)
|
42
|
|
-@SpringBootTest
|
|
23
|
+@SpringBootTest(classes = EtlCamelHugeApplication.class)
|
43
|
24
|
class EtlCamelHugeApplicationTests {
|
44
|
25
|
|
45
|
26
|
/* @Autowired
|
|
@@ -181,6 +162,13 @@ class EtlCamelHugeApplicationTests {
|
181
|
162
|
public static void main(String args[]) throws Exception {
|
182
|
163
|
System.out.println(LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
|
183
|
164
|
}
|
|
165
|
+ @Resource(name = "diagnoseMessageProducer")
|
|
166
|
+ private MessageProducer producer;
|
184
|
167
|
|
|
168
|
+ @Test
|
|
169
|
+ public void testProducer(){
|
|
170
|
+ producer.send(new DiagnoseMsg("xx1","asdf","0","2225-12-12 12:12:56"
|
|
171
|
+ ,"123.,2,3,2,31.2.31.23.0","dfasdf",12,12));
|
|
172
|
+ }
|
185
|
173
|
|
186
|
174
|
}
|