pom.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/genersoft/iot/vmp/ServletInitializer.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/genersoft/iot/vmp/conf/ProxyServletConfig.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
pom.xml
@@ -14,6 +14,7 @@ <version>2.6.7</version> <name>web video platform</name> <description>国标28181视频平台</description> <packaging>${project.packaging}</packaging> <repositories> <repository> @@ -56,6 +57,42 @@ <asciidoctor.pdf.output.directory>${project.build.directory}/asciidoc/pdf</asciidoctor.pdf.output.directory> </properties> <profiles> <profile> <id>jar</id> <activation> <activeByDefault>true</activeByDefault> </activation> <properties> <project.packaging>jar</project.packaging> </properties> </profile> <profile> <id>war</id> <properties> <project.packaging>war</project.packaging> </properties> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> <exclusions> <exclusion> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-tomcat</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <version>3.1.0</version> <scope>provided</scope> </dependency> </dependencies> </profile> </profiles> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> src/main/java/com/genersoft/iot/vmp/ServletInitializer.java
New file @@ -0,0 +1,13 @@ package com.genersoft.iot.vmp; import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; public class ServletInitializer extends SpringBootServletInitializer { @Override protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { return application.sources(VManageBootstrap.class); } } src/main/java/com/genersoft/iot/vmp/conf/ProxyServletConfig.java
@@ -2,7 +2,6 @@ import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem; import com.genersoft.iot.vmp.service.IMediaServerService; import org.apache.catalina.connector.ClientAbortException; import org.apache.http.HttpHost; import org.apache.http.HttpRequest; import org.apache.http.HttpResponse; @@ -15,11 +14,9 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.util.ObjectUtils; import org.springframework.util.StringUtils; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.net.ConnectException; @@ -77,9 +74,7 @@ } catch (IOException ioException) { if (ioException instanceof ConnectException) { logger.error("zlm 连接失败"); } else if (ioException instanceof ClientAbortException) { logger.error("zlm: 用户已中断连接,代理终止"); } else { } else { logger.error("zlm 代理失败: ", e); } } catch (RuntimeException exception){ @@ -195,9 +190,7 @@ } catch (IOException ioException) { if (ioException instanceof ConnectException) { logger.error("录像服务 连接失败"); } else if (ioException instanceof ClientAbortException) { logger.error("录像服务:用户已中断连接,代理终止"); } else { }else { logger.error("录像服务 代理失败: ", e); } } catch (RuntimeException exception){