瀏覽代碼

auto make

lloyd 3 年之前
父節點
當前提交
7041311a32

+ 5 - 5
pom.xml

@@ -103,10 +103,10 @@
103 103
             <groupId>org.springframework.boot</groupId>
104 104
             <artifactId>spring-boot-starter-web</artifactId>
105 105
         </dependency>
106
-        <dependency>
107
-            <groupId>org.springframework.boot</groupId>
108
-            <artifactId>spring-boot-starter-actuator</artifactId>
109
-        </dependency>
106
+<!--        <dependency>-->
107
+<!--            <groupId>org.springframework.boot</groupId>-->
108
+<!--            <artifactId>spring-boot-starter-actuator</artifactId>-->
109
+<!--        </dependency>-->
110 110
         <dependency>
111 111
             <groupId>org.springframework.integration</groupId>
112 112
             <artifactId>spring-integration-jms</artifactId>
@@ -185,7 +185,7 @@
185 185
         <dependency>
186 186
             <groupId>com.alibaba</groupId>
187 187
             <artifactId>fastjson</artifactId>
188
-            <version>1.2.69</version>
188
+            <version>2.0.6</version>
189 189
         </dependency>
190 190
         <dependency>
191 191
             <groupId>org.assertj</groupId>

+ 1 - 1
src/main/java/com/gct/tools/etlcamelhuge/controller/GtController.java

@@ -50,7 +50,7 @@ public class GtController {
50 50
     public JSONObject sendGTSJ(@RequestBody GTBody gtBody){
51 51
         String startDate = gtBody.getStartDate();
52 52
         String endDate = gtBody.getEndDate();
53
-        List<String> wellList = gtBody.getWellList().stream().map(x->x.toString()).collect(Collectors.toList());
53
+        List<String> wellList = (List<String>) gtBody.getWellList().stream().map(x->x.toString()).collect(Collectors.toList());
54 54
         JSONObject jsonObject = new JSONObject();
55 55
         jdbcTemplate = new JdbcTemplate(dataSource);
56 56
         long sumData = 0;

+ 2 - 12
src/main/resources/application.yml

@@ -4,8 +4,8 @@ camel:
4 4
 # 日志打印级别
5 5
 logging:
6 6
   level:
7
-    root: error
8
-    com.gct.tools.etlcamelhuge.routeconfig: error
7
+    root: debug
8
+    com.gct.tools.etlcamelhuge.routeconfig: debug
9 9
 spring:
10 10
   ## 数据库配置
11 11
   datasource:
@@ -141,16 +141,6 @@ server:
141 141
   port: 9999
142 142
 
143 143
 
144
-rocketmq:
145
-  #rocketmq的路由调度器的地址
146
-  name-server: 10.72.143.2:9876
147
-  producer:
148
-    # 消息分组
149
-    group: aoid
150
-    # 超时时间
151
-    sendMessageTimeout: 300000
152
-    access-key: 123456
153
-    secret-key: 123456
154 144
 gct:
155 145
   rocketmq:
156 146
     one:

+ 11 - 23
src/test/java/com/gct/tools/etlcamelhuge/EtlCamelHugeApplicationTests.java

@@ -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
 }