diff --git a/bootstrap.sh b/bootstrap.sh index 0f3c4c977..dcdf35e11 100644 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -43,7 +43,7 @@ start() then echo "ERROR: jar file not found" else - nohup java $JAVA_OPT -Djava.security.egd=file:/dev/./urandom -jar $PWD/$JARFILE > nohup.out 2>&1 & + nohup java $JAVA_OPT -Djava.security.egd=file:/dev/./urandom -jar -Dspring.config.location=./application-prod.yml $PWD/$JARFILE --spring.profiles.active=prod > nohup.out 2>&1 & echo $! > $PID_FILE echo "Application $JARFILE starting..." tail -f nohup.out diff --git a/src/main/java/com/genersoft/iot/vmp/conf/CivilCodeFileConf.java b/src/main/java/com/genersoft/iot/vmp/conf/CivilCodeFileConf.java index 39e0a70a4..20b6eef77 100644 --- a/src/main/java/com/genersoft/iot/vmp/conf/CivilCodeFileConf.java +++ b/src/main/java/com/genersoft/iot/vmp/conf/CivilCodeFileConf.java @@ -12,7 +12,10 @@ import org.springframework.core.annotation.Order; import org.springframework.core.io.ClassPathResource; import org.springframework.util.ObjectUtils; -import java.io.*; +import java.io.BufferedReader; +import java.io.File; +import java.io.InputStream; +import java.io.InputStreamReader; import java.nio.file.Files; import java.util.Map; diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/ISIPCommanderForPlatform.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/ISIPCommanderForPlatform.java index 0332aabe6..a4558c751 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/ISIPCommanderForPlatform.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/ISIPCommanderForPlatform.java @@ -20,6 +20,8 @@ public interface ISIPCommanderForPlatform { void register(ParentPlatform parentPlatform, SipSubscribe.Event errorEvent , SipSubscribe.Event okEvent) throws InvalidArgumentException, ParseException, SipException; void register(ParentPlatform parentPlatform, SipTransactionInfo sipTransactionInfo, SipSubscribe.Event errorEvent , SipSubscribe.Event okEvent) throws InvalidArgumentException, ParseException, SipException; + + void register(ParentPlatform parentPlatform, SipTransactionInfo sipTransactionInfo, WWWAuthenticateHeader www, SipSubscribe.Event errorEvent , SipSubscribe.Event okEvent, boolean isRegister) throws SipException, InvalidArgumentException, ParseException; /** diff --git a/src/main/java/com/genersoft/iot/vmp/utils/redis/RedisUtil.java b/src/main/java/com/genersoft/iot/vmp/utils/redis/RedisUtil.java index 31e89f971..48369d422 100644 --- a/src/main/java/com/genersoft/iot/vmp/utils/redis/RedisUtil.java +++ b/src/main/java/com/genersoft/iot/vmp/utils/redis/RedisUtil.java @@ -1,5 +1,6 @@ package com.genersoft.iot.vmp.utils.redis; +import com.google.common.collect.Lists; import org.springframework.data.redis.core.Cursor; import org.springframework.data.redis.core.RedisCallback; import org.springframework.data.redis.core.RedisTemplate; @@ -38,7 +39,7 @@ public class RedisUtil { return keys; }); - return new ArrayList<>(resultKeys); + return Lists.newArrayList(resultKeys); } } diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index e7cb70529..d44d3164a 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -77,7 +77,7 @@ media: # [必须修改] zlm服务器的内网IP ip: 172.19.128.50 # [必须修改] zlm服务器的http.port - http-port: 80 + http-port: 9092 # [可选] 返回流地址时的ip,置空使用 media.ip stream-ip: 172.19.128.50 # [可选] wvp在国标信令中使用的ip,此ip为摄像机可以访问到的ip, 置空使用 media.ip @@ -87,7 +87,7 @@ media: # [可选] zlm服务器的http.sslport, 置空使用zlm配置文件配置 http-ssl-port: 443 # [可选] zlm服务器的hook.admin_params=secret - secret: 035c73f7-bb6b-4889-a715-d9eb2d1925cc + secret: 1000 # 启用多端口模式, 多端口模式使用端口区分每路流,兼容性更好。 单端口使用流的ssrc区分, 点播超时建议使用多端口测试 rtp: # [可选] 是否启用多端口模式, 开启后会在portRange范围内选择端口用于媒体流传输 @@ -108,10 +108,9 @@ user-settings: device-status-notify: true # 跨域配置,配置你访问前端页面的地址即可, 可以配置多个 allowed-origins: - - http://localhost:8080 - - http://127.0.0.1:8080 - - http://172.19.128.50:8080 + - http://localhost:9091 - http://127.0.0.1:9091 + - http://172.19.128.50:9091 # [可选] 日志配置, 一般不需要改 logging: config: classpath:logback-spring-local.xml