From c4c1c6cf89781eb06dc02b677a8954fdb2666c43 Mon Sep 17 00:00:00 2001 From: zhanghua <314079846@qq.com> Date: 星期三, 16 七月 2025 22:39:06 +0800 Subject: [PATCH] 添加时间筛选 --- ycl-platform/src/main/java/com/ycl/PlatformApplication.java | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 54 insertions(+), 4 deletions(-) diff --git a/ycl-platform/src/main/java/com/ycl/PlatformApplication.java b/ycl-platform/src/main/java/com/ycl/PlatformApplication.java index fa37ccd..f77c2d7 100644 --- a/ycl-platform/src/main/java/com/ycl/PlatformApplication.java +++ b/ycl-platform/src/main/java/com/ycl/PlatformApplication.java @@ -1,13 +1,63 @@ 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; +import org.springframework.scheduling.annotation.EnableAsync; +import org.springframework.scheduling.annotation.EnableScheduling; +import org.springframework.transaction.annotation.EnableTransactionManagement; -@SpringBootApplication +import java.net.InetAddress; +import java.net.UnknownHostException; + +@Slf4j +@Configuration +@EnableAspectJAutoProxy(proxyTargetClass = true, exposeProxy = true) +@EnableAsync(proxyTargetClass = true) +@EnableScheduling +@EnableFeignClients +@EnableTransactionManagement(proxyTargetClass = true) +@SpringBootApplication(scanBasePackages = "com.ycl") public class PlatformApplication { + public static void main(String[] args) throws UnknownHostException { + ConfigurableApplicationContext application = SpringApplication.run(PlatformApplication.class, args); - public static void main(String[] args) { - SpringApplication.run(PlatformApplication.class, args); + Environment env = application.getEnvironment(); + log.info("\n----------------------------------------------------------\n\t" + + "搴旂敤 '{}' 杩愯鎴愬姛! 璁块棶杩炴帴:\n\t" + + "Swagger鏂囨。: \t\thttp://{}:{}{}/doc.html\n\t" + + "鏁版嵁搴撶洃鎺�: \t\thttp://{}:{}/druid\n" + + "----------------------------------------------------------", + env.getProperty("spring.application.name"), + InetAddress.getLocalHost().getHostAddress(), + env.getProperty("server.port"), + 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()); +// } } - } -- Gitblit v1.8.0