From 51c19c397d86259cdf2d9483a6f39332f8be3724 Mon Sep 17 00:00:00 2001 From: yanggs <yanggs@goldencis.com> Date: 星期四, 01 六月 2023 13:30:48 +0800 Subject: [PATCH] 修复 启用代理失败: ->缺少必要参数:"src_url","dst_url","timeout_ms" --- src/main/java/com/genersoft/iot/vmp/conf/MediaConfig.java | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/conf/MediaConfig.java b/src/main/java/com/genersoft/iot/vmp/conf/MediaConfig.java index 29b2d8d..e39292d 100644 --- a/src/main/java/com/genersoft/iot/vmp/conf/MediaConfig.java +++ b/src/main/java/com/genersoft/iot/vmp/conf/MediaConfig.java @@ -6,6 +6,7 @@ import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Configuration; +import org.springframework.core.annotation.Order; import org.springframework.util.ObjectUtils; import java.net.InetAddress; @@ -14,6 +15,7 @@ @Configuration("mediaConfig") +@Order(0) public class MediaConfig{ private final static Logger logger = LoggerFactory.getLogger(MediaConfig.class); @@ -25,7 +27,7 @@ @Value("${media.ip}") private String ip; - @Value("${media.hook-ip:${sip.ip}}") + @Value("${media.hook-ip:}") private String hookIp; @Value("${sip.ip}") @@ -86,7 +88,7 @@ public String getHookIp() { if (ObjectUtils.isEmpty(hookIp)){ - return sipIp; + return sipIp.split(",")[0]; }else { return hookIp; } -- Gitblit v1.8.0