فهرست منبع

新增nginx变量

zhangqiankun 2 سال پیش
والد
کامیت
f5cd346ca9

+ 4 - 0
pom.xml

@@ -35,6 +35,10 @@
 
 	<dependencies>
 		<dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-validation</artifactId>
+        </dependency>
+		<dependency>
 			<groupId>org.springframework.boot</groupId>
 			<artifactId>spring-boot-starter-web</artifactId>
 		</dependency>

+ 3 - 4
src/main/java/com/persagy/cameractl/conf/AllStaticConfig.java

@@ -2,12 +2,9 @@ package com.persagy.cameractl.conf;
 
 import java.io.File;
 import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
 
-import com.persagy.nvr.VideoNoViskHeadFrameCallBackClass;
 import com.persagy.nvr.DataPlayCallBackClass;
-import com.persagy.nvr.EndPlayCallBackClass;
+import com.persagy.nvr.VideoNoViskHeadFrameCallBackClass;
 import com.persagy.nvr.VskClient;
 
 public class AllStaticConfig {
@@ -35,6 +32,8 @@ public class AllStaticConfig {
 	public static String zhaoshangTvWallId;
 
 	public static String zhaoshangTvScreenId;
+	
+	public static String nginxAddress;
 
 	public static String getLibmp4v2Path() {
 		File directory = new File("./config/lib/libmp4v2.dll");

+ 2 - 0
src/main/java/com/persagy/cameractl/conf/CameraConfig.java

@@ -35,6 +35,8 @@ public class CameraConfig {
 	@Value("${zhaoshang-config.tvScreenId}")
 	private String zhaoshangTvScreenId;
 	
+	@Value("${zhaoshang-config.nginx-address:}")
+	private String nginxAddress;
 	
 	@Value("${tcl.ip}")
 	private String tclIp;

+ 1 - 0
src/main/java/com/persagy/cameractl/init/SystemInit.java

@@ -44,6 +44,7 @@ public class SystemInit implements ApplicationRunner {
 		AllStaticConfig.zhaoshangApiSecret = cameraConfig.getZhaoshangApiSecret();
 		AllStaticConfig.zhaoshangTvWallId = cameraConfig.getZhaoshangTvWallId();
 		AllStaticConfig.zhaoshangTvScreenId = cameraConfig.getZhaoshangTvScreenId();
+		AllStaticConfig.nginxAddress = cameraConfig.getNginxAddress();
 
 		// NVR9000
 		NVR9Config.tclIp = cameraConfig.getTclIp();

+ 1 - 1
src/main/java/com/persagy/cameractl/service/windows/ZhaosMainWindows.java

@@ -380,7 +380,7 @@ public class ZhaosMainWindows {
 
 	private ResultClass playBackSuccess(String playBackFileName){
 		Map<String, String> dataMap = new HashMap<>();
-		dataMap.put("file", playBackFileName);
+		dataMap.put("videoUrl", AllStaticConfig.nginxAddress + playBackFileName);
 		return this.executeSuccess(dataMap);
 	}
 

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1 - 1
src/main/resources/application.yml