| | |
| | | package com.ycl; |
| | | |
| | | import com.dahua.netsdk.AppDemo; |
| | | import com.ycl.util.SpringContextUtil; |
| | | import com.ycl.util.VideoUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.boot.SpringApplication; |
| | | import org.springframework.boot.autoconfigure.SpringBootApplication; |
| | | import org.springframework.cloud.openfeign.EnableFeignClients; |
| | | import org.springframework.context.ConfigurableApplicationContext; |
| | | import org.springframework.context.annotation.ComponentScan; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.context.annotation.EnableAspectJAutoProxy; |
| | | import org.springframework.core.env.Environment; |
| | |
| | | @EnableAspectJAutoProxy(proxyTargetClass = true, exposeProxy = true) |
| | | @EnableAsync(proxyTargetClass = true) |
| | | @EnableScheduling |
| | | @EnableFeignClients |
| | | @EnableTransactionManagement(proxyTargetClass = true) |
| | | @SpringBootApplication |
| | | @SpringBootApplication(scanBasePackages = "com.ycl") |
| | | public class PlatformApplication { |
| | | |
| | | public static void main(String[] args) throws UnknownHostException { |
| | | ConfigurableApplicationContext application = SpringApplication.run(PlatformApplication.class, args); |
| | | |
| | |
| | | env.getProperty("server.servlet.context-path"), |
| | | "127.0.0.1", |
| | | env.getProperty("server.port")); |
| | | } |
| | | |
| | | try { |
| | | new AppDemo().start(); |
| | | } catch (Exception e) { |
| | | log.info("执行大华报警程序出错:", e.getMessage()); |
| | | } |
| | | |
| | | // try { |
| | | // // 启动时,保存上下文,并保存为静态 |
| | | // SpringContextUtil.setAc(application); |
| | | // new OSSImageMove().start(); |
| | | // } catch (Exception e) { |
| | | // log.info("图片程序出错:", e.getMessage()); |
| | | // } |
| | | } |
| | | } |