Browse Source

引进镜屏

wangchao 4 years ago
parent
commit
987433680a

+ 12 - 0
security-protection-service/pom.xml

@ -186,6 +186,18 @@
186 186
            <version>2.6.12</version>
187 187
        </dependency>
188 188
189
        <!--  IPU 镜屏 -->
190
        <dependency>
191
            <groupId>com.ai.ipu.server</groupId>
192
            <artifactId>iot-stomp-server</artifactId>
193
            <version>3.1-SNAPSHOT</version>
194
            <exclusions>
195
                <exclusion>
196
                    <groupId>org.apache.logging.log4j</groupId>
197
                    <artifactId>log4j-slf4j-impl</artifactId>
198
                </exclusion>
199
            </exclusions>
200
        </dependency>
189 201
190 202
    </dependencies>
191 203
    <repositories>

+ 10 - 0
security-protection-service/src/main/java/com/ai/bss/security/protection/SecurityProtectionApp.java

@ -1,5 +1,8 @@
1 1
package com.ai.bss.security.protection;
2 2
3
import com.ai.ipu.server.connect.ConnectServerStart;
4
import com.ai.ipu.server.connect.util.ConnectServerManager;
5
import com.ai.ipu.server.stomp.WebSocketStompServer;
3 6
import org.springframework.boot.SpringApplication;
4 7
import org.springframework.boot.autoconfigure.SpringBootApplication;
5 8
import org.springframework.boot.autoconfigure.domain.EntityScan;
@ -18,6 +21,13 @@ import org.springframework.scheduling.annotation.EnableAsync;
18 21
@SpringBootApplication
19 22
public class SecurityProtectionApp {
20 23
    public static void main(String[] args) throws Exception {
24
        System.setProperty("websocket.port", "7200");
25
26
        //注册镜屏服务
27
        ConnectServerManager.registerServer("websocket.port", new WebSocketStompServer("/stomp"));
28
        //镜屏服务启动
29
        ConnectServerStart.start(args, false);
30
21 31
        SpringApplication.run(SecurityProtectionApp.class, args);
22 32
    }
23 33
}

+ 2 - 0
security-protection-service/src/main/java/com/ai/bss/security/protection/service/task/AiResultRecordKafkaTask.java

@ -49,6 +49,8 @@ public class AiResultRecordKafkaTask {
49 49
50 50
	@KafkaListener(containerFactory = "kafkaBatchListener6", topics = "${kafka.topic.aitask:topic_ai_task}", groupId = "ai_group")
51 51
	public void AiResultRecordListener(ConsumerRecord<String, String> records, Acknowledgment ack) throws Throwable {
52
	/*@KafkaListener(containerFactory = "kafkaBatchListener6", topics = "${kafka.topic.aitask:topicTaskTest}", groupId = "ai_group")
53
	public void AiResultRecordListener(ConsumerRecord<String, String> records, Acknowledgment ack) throws Throwable {*/
52 54
		try {
53 55
			log.debug("----------------AI任务执行结果信息消费开始---------------------------");
54 56