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/SipConfig.java | 16 ++++++++++++---- 1 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/conf/SipConfig.java b/src/main/java/com/genersoft/iot/vmp/conf/SipConfig.java index 4790fa4..6a6c54f 100644 --- a/src/main/java/com/genersoft/iot/vmp/conf/SipConfig.java +++ b/src/main/java/com/genersoft/iot/vmp/conf/SipConfig.java @@ -1,15 +1,18 @@ package com.genersoft.iot.vmp.conf; +import org.springframework.core.annotation.Order; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.stereotype.Component; -import org.springframework.util.ObjectUtils; @Component @ConfigurationProperties(prefix = "sip", ignoreInvalidFields = true) +@Order(0) public class SipConfig { private String ip; + + private String showIp; private Integer port; @@ -94,9 +97,14 @@ this.alarm = alarm; } - public void getLocalIp(String deviceLocalIp) { - if (ObjectUtils.isEmpty(deviceLocalIp)) { - + public String getShowIp() { + if (this.showIp == null) { + return this.ip; } + return showIp; + } + + public void setShowIp(String showIp) { + this.showIp = showIp; } } -- Gitblit v1.8.0