瀏覽代碼

引进镜屏

wangchao 4 年之前
父節點
當前提交
987433680a

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

186
            <version>2.6.12</version>
186
            <version>2.6.12</version>
187
        </dependency>
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
    </dependencies>
202
    </dependencies>
191
    <repositories>
203
    <repositories>

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

1
package com.ai.bss.security.protection;
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
import org.springframework.boot.SpringApplication;
6
import org.springframework.boot.SpringApplication;
4
import org.springframework.boot.autoconfigure.SpringBootApplication;
7
import org.springframework.boot.autoconfigure.SpringBootApplication;
5
import org.springframework.boot.autoconfigure.domain.EntityScan;
8
import org.springframework.boot.autoconfigure.domain.EntityScan;
18
@SpringBootApplication
21
@SpringBootApplication
19
public class SecurityProtectionApp {
22
public class SecurityProtectionApp {
20
    public static void main(String[] args) throws Exception {
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
        SpringApplication.run(SecurityProtectionApp.class, args);
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
49
50
	@KafkaListener(containerFactory = "kafkaBatchListener6", topics = "${kafka.topic.aitask:topic_ai_task}", groupId = "ai_group")
50
	@KafkaListener(containerFactory = "kafkaBatchListener6", topics = "${kafka.topic.aitask:topic_ai_task}", groupId = "ai_group")
51
	public void AiResultRecordListener(ConsumerRecord<String, String> records, Acknowledgment ack) throws Throwable {
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
		try {
54
		try {
53
			log.debug("----------------AI任务执行结果信息消费开始---------------------------");
55
			log.debug("----------------AI任务执行结果信息消费开始---------------------------");
54
56