package com.greentech.gateservice; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.scheduling.annotation.EnableScheduling; import redis.clients.jedis.JedisPool; import com.greentech.gateservice.service.*; import com.greentech.gateservice.controller.CameraController; import com.greentech.gateservice.redis.SubThread; @SpringBootApplication @EnableScheduling public class GateServiceApplication { private static final JedisPool jedisPool = new JedisPool("47.96.12.136", 6379); public static void main(String[] args) { boolean ok = CameraController.init(new CameraDisConnect(jedisPool), new CameraReConnect(jedisPool)); if (!ok) { System.out.println("dahua sdk init fail"); System.exit(1); } SubThread subThread = new SubThread(jedisPool); subThread.start(); SpringApplication.run(GateServiceApplication.class, args); } }