yq vor 3 Jahren
Ursprung
Commit
6b2ca01c54

+ 44 - 0
dxcollect-controller/pom.xml

@@ -52,6 +52,50 @@
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-log4j2</artifactId>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.logging.log4j</groupId>
+                    <artifactId>log4j-api</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.logging.log4j</groupId>
+                    <artifactId>log4j-core</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.logging.log4j</groupId>
+                    <artifactId>log4j-jul</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.logging.log4j</groupId>
+                    <artifactId>log4j-slf4j-impl</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-api</artifactId>
+            <version>2.17.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-core</artifactId>
+            <version>2.17.2</version>
+            <exclusions>
+                <exclusion>
+                    <artifactId>log4j-api</artifactId>
+                    <groupId>org.apache.logging.log4j</groupId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-jul</artifactId>
+            <version>2.17.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-slf4j-impl</artifactId>
+            <version>2.17.2</version>
         </dependency>
 
         <dependency>

+ 3 - 0
dxcollect-controller/src/main/resources/application-prod.properties

@@ -108,3 +108,6 @@ mqtt.keep-alive-interval=60
 mqtt.username=usky
 mqtt.password=usky
 mqtt.url=tcp://47.98.201.73:1883
+
+rocketmq.name-server=10.21.39.4:9876
+rocketmq.producer.group=my-producer-group

+ 1 - 1
dxcollect-controller/src/main/resources/log4j2-spring-dev.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <configuration status="OFF">
     <properties>
-        <property name="LOG_HOME">./logs/product</property>
+        <property name="LOG_HOME">./logs/dxcollect</property>
         <Property name="CONSOLE_LOG_PATTERN">%clr{%d{yyyy-MM-dd HH:mm:ss.SSS}}{blue} %clr{%-5level}
             %clr{${sys:PID}}{magenta} %clr{---}{faint} %clr{[%15.15t]}{faint} %clr{%l}{cyan} %clr{:}{faint} %m%n%xwEx
         </Property>

+ 1 - 1
dxcollect-controller/src/main/resources/log4j2-spring-prod.xml

@@ -2,7 +2,7 @@
 <configuration status="OFF">
 
     <properties>
-        <property name="LOG_HOME">/data/logs/product</property>
+        <property name="LOG_HOME">/app/service/logs/dxcollect</property>
         <Property name="CONSOLE_LOG_PATTERN">%clr{%d{yyyy-MM-dd HH:mm:ss.SSS}}{blue} %clr{%-5level}
             %clr{${sys:PID}}{magenta} %clr{---}{faint} %clr{[%15.15t]}{faint} %clr{%l}{cyan} %clr{:}{faint} %m%n%xwEx
         </Property>

+ 0 - 3
dxcollect-service/src/main/java/com/usky/service/listener/RocketMqListener.java

@@ -21,8 +21,5 @@ public class RocketMqListener  implements RocketMQListener<String> {
     public void onMessage(String message) {
 
         entranceLogService.save(JsonUtils.fromJson(message, EntranceLog.class));
-        // 打印出消息内容
-        log.info("==============================================>");
-        System.out.println(message);
     }
 }