From 42a2772d1aa7493bcc4fac3e24ee8eda4eebc23d Mon Sep 17 00:00:00 2001 From: xubinbin <1323875150@qq.com> Date: 星期二, 12 十二月 2023 17:09:04 +0800 Subject: [PATCH] bugfix:请求头带token, SecurityUtils 获取用户id 一直为0 #1195 --- src/main/java/com/genersoft/iot/vmp/conf/MediaConfig.java | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 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 cd22880..20ed8cb 100644 --- a/src/main/java/com/genersoft/iot/vmp/conf/MediaConfig.java +++ b/src/main/java/com/genersoft/iot/vmp/conf/MediaConfig.java @@ -2,11 +2,11 @@ import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem; import com.genersoft.iot.vmp.utils.DateUtil; -import org.junit.jupiter.api.Order; import org.slf4j.Logger; 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; @@ -219,13 +219,6 @@ return mediaServerItem; } - private boolean isValidIPAddress(String ipAddress) { - if ((ipAddress != null) && (!ipAddress.isEmpty())) { - return Pattern.matches("^([1-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])(\\.(\\d|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])){3}$", ipAddress); - } - return false; - } - public String getRtpSendPortRange() { return rtpSendPortRange; } @@ -233,4 +226,11 @@ public void setRtpSendPortRange(String rtpSendPortRange) { this.rtpSendPortRange = rtpSendPortRange; } + + private boolean isValidIPAddress(String ipAddress) { + if ((ipAddress != null) && (!ipAddress.isEmpty())) { + return Pattern.matches("^([1-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])(\\.(\\d|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])){3}$", ipAddress); + } + return false; + } } -- Gitblit v1.8.0