diff --git a/pom.xml b/pom.xml index 29433430..7b5306e0 100644 --- a/pom.xml +++ b/pom.xml @@ -14,6 +14,7 @@ 2.6.7 web video platform 国标28181视频平台 + ${project.packaging} @@ -56,6 +57,42 @@ ${project.build.directory}/asciidoc/pdf + + + jar + + true + + + jar + + + + war + + war + + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-tomcat + + + + + javax.servlet + javax.servlet-api + 3.1.0 + provided + + + + + org.springframework.boot diff --git a/src/main/java/com/genersoft/iot/vmp/ServletInitializer.java b/src/main/java/com/genersoft/iot/vmp/ServletInitializer.java new file mode 100644 index 00000000..d5639f2e --- /dev/null +++ b/src/main/java/com/genersoft/iot/vmp/ServletInitializer.java @@ -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); + } + +} diff --git a/src/main/java/com/genersoft/iot/vmp/conf/ProxyServletConfig.java b/src/main/java/com/genersoft/iot/vmp/conf/ProxyServletConfig.java index d0abfbf7..c4086b9e 100644 --- a/src/main/java/com/genersoft/iot/vmp/conf/ProxyServletConfig.java +++ b/src/main/java/com/genersoft/iot/vmp/conf/ProxyServletConfig.java @@ -2,7 +2,6 @@ package com.genersoft.iot.vmp.conf; 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.boot.web.servlet.ServletRegistrationBean; 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 @@ public class ProxyServletConfig { } 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 @@ public class ProxyServletConfig { } catch (IOException ioException) { if (ioException instanceof ConnectException) { logger.error("录像服务 连接失败"); - } else if (ioException instanceof ClientAbortException) { - logger.error("录像服务:用户已中断连接,代理终止"); - } else { + }else { logger.error("录像服务 代理失败: ", e); } } catch (RuntimeException exception){