diff --git a/.gitignore b/.gitignore index c6a38c6b1..168f6cc8d 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,4 @@ certificates /docker/wvp/config/jwk.json /打包/ /snap/ +/config/ diff --git a/pom.xml b/pom.xml index 7ef99869c..1ee0828fa 100644 --- a/pom.xml +++ b/pom.xml @@ -411,6 +411,12 @@ commons-pool2 + + com.github.ben-manes.caffeine + caffeine + 3.2.3 + + org.springframework.boot spring-boot-starter-test 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 94be102cc..63925430f 100644 --- a/src/main/java/com/genersoft/iot/vmp/conf/SipConfig.java +++ b/src/main/java/com/genersoft/iot/vmp/conf/SipConfig.java @@ -32,5 +32,7 @@ public class SipConfig { Integer registerTimeInterval = 120; + private boolean alarm = true; + private long timeout = 1000; } diff --git a/src/main/java/com/genersoft/iot/vmp/conf/UserSetting.java b/src/main/java/com/genersoft/iot/vmp/conf/UserSetting.java index ef3614258..0d1e2e47c 100644 --- a/src/main/java/com/genersoft/iot/vmp/conf/UserSetting.java +++ b/src/main/java/com/genersoft/iot/vmp/conf/UserSetting.java @@ -183,7 +183,7 @@ public class UserSetting { /** * jwk文件路径,若不指定则使用resources目录下的jwk.json */ - private String jwkFile = "classpath:jwk.json"; + private String jwkFile = null; /** * wvp集群模式下如果注册向上级的wvp奔溃,则自动选择一个其他wvp继续注册到上级 @@ -229,6 +229,12 @@ public class UserSetting { */ private boolean subscribeMobilePosition = false; + /** + * 处理报警消息时,会缓存通道数据,如果超出则丢弃低热度消息,被丢弃的通道下次使用就需要重新查询数据库,默认10000, + * 建议根据实际情况调整,过大可能会占用较多内存,过小可能会增加数据库查询压力 + */ + private long alarmCatchSize = 10000; + } diff --git a/src/main/java/com/genersoft/iot/vmp/conf/security/JwtUtils.java b/src/main/java/com/genersoft/iot/vmp/conf/security/JwtUtils.java index 7c952aeef..c67895018 100644 --- a/src/main/java/com/genersoft/iot/vmp/conf/security/JwtUtils.java +++ b/src/main/java/com/genersoft/iot/vmp/conf/security/JwtUtils.java @@ -104,8 +104,9 @@ public class JwtUtils implements InitializingBean { } String jwkFile = userSetting.getJwkFile(); if (jwkFile == null || jwkFile.trim().isEmpty()) { - log.error("[API AUTH] JWK文件路径未配置!"); - return createDefaultRsaKey(); + log.error("[API AUTH] JWK文件路径未配置!使用默认配置路径:./config/jwk.json"); + jwkFile = "config" + File.separator + "jwk.json"; // 默认外部路径 + return createAndPersistDefaultRsaKey(jwkFile); } // 尝试读取JWK文件(自动处理classpath/本地文件,用try-with-resources自动关流,无泄露) @@ -131,7 +132,7 @@ public class JwtUtils implements InitializingBean { log.error("[API AUTH] JWK文件中无有效RSA私钥(仅公钥无法签名JWT)"); } catch (IOException e) { - log.error("[API AUTH] 读取JWK文件失败(路径:{})", jwkFile, e); + log.error("[API AUTH] 读取JWK文件失败(路径:{})", jwkFile); } catch (Exception e) { log.error("[API AUTH] 解析JWK文件失败(JSON格式错误或密钥无效)", e); } @@ -154,7 +155,7 @@ public class JwtUtils implements InitializingBean { return resource.getInputStream(); } // throw new IOException("classpath下JWK文件不存在:" + filePath); - } + } { File file = determinePersistPath(jwkFile).toFile();// 外部配置与classpath失败场景下 if (file.exists() && file.canRead()) { diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/bean/DeviceAlarm.java b/src/main/java/com/genersoft/iot/vmp/gb28181/bean/DeviceAlarm.java deleted file mode 100644 index 6c273b70c..000000000 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/bean/DeviceAlarm.java +++ /dev/null @@ -1,299 +0,0 @@ -package com.genersoft.iot.vmp.gb28181.bean; - -import com.genersoft.iot.vmp.service.bean.AlarmType; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; - -import java.util.HashSet; -import java.util.Set; - -/** - * @author lin - */ -@Schema(description = "报警信息") -@Data -public class DeviceAlarm { - - @Schema(description = "设备的国标编号") - private String deviceId; - - @Schema(description = "设备名称") - private String deviceName; - - /** - * 通道Id - */ - @Schema(description = "通道的国标编号") - private String channelId; - - /** - * 报警级别, 1为一级警情, 2为二级警情, 3为三级警情, 4为四级警情 - */ - @Schema(description = "报警级别, 1为一级警情, 2为二级警情, 3为三级警情, 4为四级警情") - private String alarmPriority; - - @Schema(description = "报警级别, 1为一级警情, 2为二级警情, 3为三级警情, 4为四级警情") - private String alarmPriorityDescription; - - public String getAlarmPriorityDescription() { - switch (alarmPriority) { - case "1": - return "一级警情"; - case "2": - return "二级警情"; - case "3": - return "三级警情"; - case "4": - return "四级警情"; - default: - return alarmPriority; - } - } - - /** - * 报警方式 , 1为电话报警, 2为设备报警, 3为短信报警, 4为 GPS报警, 5为视频报警, 6为设备故障报警, - * 7其他报警;可以为直接组合如12为电话报警或 设备报警- - */ - @Schema(description = "报警方式 , 1为电话报警, 2为设备报警, 3为短信报警, 4为 GPS报警, 5为视频报警, 6为设备故障报警,\n" + - "\t * 7其他报警;可以为直接组合如12为电话报警或设备报警") - private String alarmMethod; - - - private String alarmMethodDescription; - - public String getAlarmMethodDescription() { - StringBuilder stringBuilder = new StringBuilder(); - char[] charArray = alarmMethod.toCharArray(); - for (char c : charArray) { - switch (c) { - case '1': - stringBuilder.append("-电话报警"); - break; - case '2': - stringBuilder.append("-设备报警"); - break; - case '3': - stringBuilder.append("-短信报警"); - break; - case '4': - stringBuilder.append("-GPS报警"); - break; - case '5': - stringBuilder.append("-视频报警"); - break; - case '6': - stringBuilder.append("-设备故障报警"); - break; - case '7': - stringBuilder.append("-其他报警"); - break; - } - } - stringBuilder.delete(0, 1); - return stringBuilder.toString(); - } - - /** - * 报警时间 - */ - @Schema(description = "报警时间") - private String alarmTime; - - /** - * 报警内容描述 - */ - @Schema(description = "报警内容描述") - private String alarmDescription; - - /** - * 经度 - */ - @Schema(description = "经度") - private double longitude; - - /** - * 纬度 - */ - @Schema(description = "纬度") - private double latitude; - - /** - * 报警类型, - * 报警方式为2时,不携带 AlarmType为默认的报警设备报警, - * 携带 AlarmType取值及对应报警类型如下: - * 1-视频丢失报警; - * 2-设备防拆报警; - * 3-存储设备磁盘满报警; - * 4-设备高温报警; - * 5-设备低温报警。 - * 报警方式为5时,取值如下: - * 1-人工视频报警; - * 2-运动目标检测报警; - * 3-遗留物检测报警; - * 4-物体移除检测报警; - * 5-绊线检测报警; - * 6-入侵检测报警; - * 7-逆行检测报警; - * 8-徘徊检测报警; - * 9-流量统计报警; - * 10-密度检测报警; - * 11-视频异常检测报警; - * 12-快速移动报警。 - * 报警方式为6时,取值下: - * 1-存储设备磁盘故障报警; - * 2-存储设备风扇故障报警。 - */ - @Schema(description = "报警类型") - private String alarmType; - - public String getAlarmTypeDescription() { - if (alarmType == null) { - return ""; - } - char[] charArray = alarmMethod.toCharArray(); - Set alarmMethodSet = new HashSet<>(); - for (char c : charArray) { - alarmMethodSet.add(Character.toString(c)); - } - String result = alarmType; - if (alarmMethodSet.contains("2")) { - switch (alarmType) { - case "1": - result = "视频丢失报警"; - break; - case "2": - result = "设备防拆报警"; - break; - case "3": - result = "存储设备磁盘满报警"; - break; - case "4": - result = "设备高温报警"; - break; - case "5": - result = "设备低温报警"; - break; - } - } - if (alarmMethodSet.contains("5")) { - switch (alarmType) { - case "1": - result = "人工视频报警"; - break; - case "2": - result = "运动目标检测报警"; - break; - case "3": - result = "遗留物检测报警"; - break; - case "4": - result = "物体移除检测报警"; - break; - case "5": - result = "绊线检测报警"; - break; - case "6": - result = "入侵检测报警"; - break; - case "7": - result = "逆行检测报警"; - break; - case "8": - result = "徘徊检测报警"; - break; - case "9": - result = "流量统计报警"; - break; - case "10": - result = "密度检测报警"; - break; - case "11": - result = "视频异常检测报警"; - break; - case "12": - result = "快速移动报警"; - break; - } - } - if (alarmMethodSet.contains("6")) { - switch (alarmType) { - case "1": - result = "存储设备磁盘故障报警"; - break; - case "2": - result = "存储设备风扇故障报警"; - break; - } - } - return result; - } - - public AlarmType getAlarmTypeEnum() { - if (alarmType == null) { - return null; - } - char[] charArray = alarmMethod.toCharArray(); - Set alarmMethodSet = new HashSet<>(); - for (char c : charArray) { - alarmMethodSet.add(Character.toString(c)); - } - if (alarmMethodSet.contains("2")) { - switch (alarmType) { - case "1": - return AlarmType.VideoLoss; - case "2": - return AlarmType.DeviceTamper; - case "3": - return AlarmType.StorageFull; - case "4": - return AlarmType.DeviceHighTemperature; - case "5": - return AlarmType.DeviceLowTemperature; - } - } - if (alarmMethodSet.contains("5")) { - switch (alarmType) { - case "1": - return AlarmType.ManualVideo; - case "2": - return AlarmType.MotionDetection; - case "3": - return AlarmType.LeftObjectDetection; - case "4": - return AlarmType.ObjectRemovalDetection; - case "5": - return AlarmType.TripwireDetection; - case "6": - return AlarmType.IntrusionDetection; - case "7": - return AlarmType.ReverseDetection; - case "8": - return AlarmType.LoiteringDetection; - case "9": - return AlarmType.FlowStatistics; - case "10": - return AlarmType.DensityDetection; - case "11": - return AlarmType.VideoAbnormal; - case "12": - return AlarmType.RapidMovement; - } - } - if (alarmMethodSet.contains("6")) { - switch (alarmType) { - case "1": - return AlarmType.StorageFault; - case "2": - return AlarmType.StorageFanFault; - } - } - return null; - } - - @Schema(description = "报警类型描述") - private String alarmTypeDescription; - - @Schema(description = "创建时间") - private String createTime; - -} diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/bean/DeviceAlarmNotify.java b/src/main/java/com/genersoft/iot/vmp/gb28181/bean/DeviceAlarmNotify.java new file mode 100644 index 000000000..f04a7aac8 --- /dev/null +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/bean/DeviceAlarmNotify.java @@ -0,0 +1,214 @@ +package com.genersoft.iot.vmp.gb28181.bean; + +import com.genersoft.iot.vmp.gb28181.utils.XmlUtil; +import com.genersoft.iot.vmp.service.bean.AlarmType; +import com.genersoft.iot.vmp.utils.DateUtil; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import org.dom4j.Element; + +import static com.genersoft.iot.vmp.gb28181.utils.XmlUtil.*; + +/** + * @author lin + */ +@Schema(description = "报警通知") +@Data +public class DeviceAlarmNotify { + + @Schema(description = "设备的国标编号") + private String deviceId; + + @Schema(description = "设备名称") + private String deviceName; + + /** + * 通道Id + */ + @Schema(description = "通道的国标编号") + private String channelId; + + /** + * 报警级别, 1为一级警情, 2为二级警情, 3为三级警情, 4为四级警情 + */ + @Schema(description = "报警级别, 1为一级警情, 2为二级警情, 3为三级警情, 4为四级警情") + private String alarmPriority; + + @Schema(description = "报警级别, 1为一级警情, 2为二级警情, 3为三级警情, 4为四级警情") + private String alarmPriorityDescription; + + /** + * 报警方式 , 1为电话报警, 2为设备报警, 3为短信报警, 4为 GPS报警, 5为视频报警, 6为设备故障报警, + * 7其他报警;可以为直接组合如12为电话报警或 设备报警- + */ + @Schema(description = "报警方式 , 1为电话报警, 2为设备报警, 3为短信报警, 4为 GPS报警, 5为视频报警, 6为设备故障报警,\n" + + "\t * 7其他报警;可以为直接组合如12为电话报警或设备报警") + private Integer alarmMethod; + + + private String alarmMethodDescription; + + + /** + * 报警时间 + */ + @Schema(description = "报警时间") + private String alarmTime; + + /** + * 报警内容描述 + */ + @Schema(description = "报警内容描述") + private String alarmDescription; + + /** + * 经度 + */ + @Schema(description = "经度") + private double longitude; + + /** + * 纬度 + */ + @Schema(description = "纬度") + private double latitude; + + /** + * 报警类型, + * 报警方式为2时,不携带 AlarmType为默认的报警设备报警, + * 携带 AlarmType取值及对应报警类型如下: + * 1-视频丢失报警; + * 2-设备防拆报警; + * 3-存储设备磁盘满报警; + * 4-设备高温报警; + * 5-设备低温报警。 + * 报警方式为5时,取值如下: + * 1-人工视频报警; + * 2-运动目标检测报警; + * 3-遗留物检测报警; + * 4-物体移除检测报警; + * 5-绊线检测报警; + * 6-入侵检测报警; + * 7-逆行检测报警; + * 8-徘徊检测报警; + * 9-流量统计报警; + * 10-密度检测报警; + * 11-视频异常检测报警; + * 12-快速移动报警。 + * 报警方式为6时,取值下: + * 1-存储设备磁盘故障报警; + * 2-存储设备风扇故障报警。 + */ + @Schema(description = "报警类型") + private Integer alarmType; + + @Schema(description = "事件类型, 在入侵检测报警时可携带") + private Integer eventType; + + public AlarmType getAlarmTypeEnum() { + if (alarmType == null) { + return null; + } + + if (alarmMethod == DeviceAlarmMethod.Device.getVal()) { + // 2为设备报警, + // 报警方式为2时, + // 不携带 AlarmType为默认的报警设备报警, + // 携带 AlarmType取值及对应报警类型如下: + // 1-视频丢失报警;2-设备防拆报警;3-存储设备磁盘满报警;4-设备高温报警;5-设备低温报警 + switch (alarmType) { + case 1: + return AlarmType.VideoLoss; + case 2: + return AlarmType.DeviceTamper; + case 3: + return AlarmType.StorageFull; + case 4: + return AlarmType.DeviceHighTemperature; + case 5: + return AlarmType.DeviceLowTemperature; + } + } + if (alarmMethod == DeviceAlarmMethod.GPS.getVal()) { + // 5为视频报警 + // 报警方式为5时, + // 取值如下: + // 1-人工视频报警;2-运动目标检测报警;3-遗留物检测报警;4-物体移除检测报警;5-绊线检测报警; + // 6-入侵检测报警;7-逆行检测报警;8-徘徊检测报警;9-流量统计报警; + // 10-密度检测报警;11-视频异常检测报警;12-快速移动报警。 + switch (alarmType) { + case 1: + return AlarmType.ManualVideo; + case 2: + return AlarmType.MotionDetection; + case 3: + return AlarmType.LeftObjectDetection; + case 4: + return AlarmType.ObjectRemovalDetection; + case 5: + return AlarmType.TripwireDetection; + case 6: + return AlarmType.IntrusionDetection; + case 7: + return AlarmType.ReverseDetection; + case 8: + return AlarmType.LoiteringDetection; + case 9: + return AlarmType.FlowStatistics; + case 10: + return AlarmType.DensityDetection; + case 11: + return AlarmType.VideoAbnormal; + case 12: + return AlarmType.RapidMovement; + } + } + if (alarmMethod == DeviceAlarmMethod.DeviceFailure.getVal()) { + switch (alarmType) { + case 1: + return AlarmType.StorageFault; + case 2: + return AlarmType.StorageFanFault; + } + } + return null; + } + + @Schema(description = "报警类型描述") + private String alarmTypeDescription; + + @Schema(description = "创建时间") + private String createTime; + + + public static DeviceAlarmNotify fromXml(Element rootElement) { + Element deviceIdElement = rootElement.element("DeviceID"); + String channelId = deviceIdElement.getText(); + + DeviceAlarmNotify deviceAlarm = new DeviceAlarmNotify(); + deviceAlarm.setCreateTime(DateUtil.getNow()); + deviceAlarm.setChannelId(channelId); + deviceAlarm.setAlarmPriority(getText(rootElement, "AlarmPriority")); + deviceAlarm.setAlarmMethod(getInteger(rootElement, "AlarmMethod")); + String alarmTime = XmlUtil.getText(rootElement, "AlarmTime"); + deviceAlarm.setAlarmTime(DateUtil.ISO8601Toyyyy_MM_dd_HH_mm_ss(alarmTime)); + deviceAlarm.setAlarmDescription(getText(rootElement, "AlarmDescription")); + + Double longitude = getDouble(rootElement, "Longitude"); + deviceAlarm.setLongitude(longitude != null ? longitude: 0.00D); + Double latitude = getDouble(rootElement, "Latitude"); + deviceAlarm.setLatitude(latitude != null ? latitude: 0.00D); + deviceAlarm.setAlarmType(getInteger(rootElement, "AlarmType")); + Element info = rootElement.element("Info"); + if (info != null) { + deviceAlarm.setAlarmType(getInteger(info, "AlarmType")); + Element alarmTypeParam = info.element("AlarmTypeParam"); + if (alarmTypeParam != null) { + deviceAlarm.setAlarmDescription(alarmTypeParam.elementText("AlarmDescription")); + } + } + deviceAlarm.setCreateTime(DateUtil.getNow()); + return deviceAlarm; + } + +} diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/dao/DeviceAlarmMapper.java b/src/main/java/com/genersoft/iot/vmp/gb28181/dao/DeviceAlarmMapper.java index c380e5906..6ea400725 100755 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/dao/DeviceAlarmMapper.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/dao/DeviceAlarmMapper.java @@ -1,6 +1,6 @@ package com.genersoft.iot.vmp.gb28181.dao; -import com.genersoft.iot.vmp.gb28181.bean.DeviceAlarm; +import com.genersoft.iot.vmp.gb28181.bean.DeviceAlarmNotify; import org.apache.ibatis.annotations.Delete; import org.apache.ibatis.annotations.Insert; import org.apache.ibatis.annotations.Mapper; @@ -19,7 +19,7 @@ public interface DeviceAlarmMapper { @Insert("INSERT INTO wvp_device_alarm (device_id, channel_id, alarm_priority, alarm_method, alarm_time, alarm_description, longitude, latitude, alarm_type , create_time ) " + "VALUES (#{deviceId}, #{channelId}, #{alarmPriority}, #{alarmMethod}, #{alarmTime}, #{alarmDescription}, #{longitude}, #{latitude}, #{alarmType}, #{createTime})") - int add(DeviceAlarm alarm); + int add(DeviceAlarmNotify alarm); @Select( value = {" "}) - List query(@Param("deviceId") String deviceId, @Param("channelId") String channelId, @Param("alarmPriority") String alarmPriority, @Param("alarmMethod") String alarmMethod, - @Param("alarmType") String alarmType, @Param("startTime") String startTime, @Param("endTime") String endTime); + List query(@Param("deviceId") String deviceId, @Param("channelId") String channelId, @Param("alarmPriority") String alarmPriority, @Param("alarmMethod") String alarmMethod, + @Param("alarmType") String alarmType, @Param("startTime") String startTime, @Param("endTime") String endTime); @Delete(" ") void deleteAlarms(@Param("ids") List ids); + + + void insertAlarms(List handlerCatchDataList); } diff --git a/src/main/resources/jwk.json b/src/main/resources/jwk.json deleted file mode 100644 index 912b8f398..000000000 --- a/src/main/resources/jwk.json +++ /dev/null @@ -1 +0,0 @@ -{"keys":[{"kty":"RSA","kid":"3e79646c4dbc408383a9eed09f2b85ae","n":"rThRAlbMRceko3NkymeSoN2ICVaDlNBLWv3cyLUeixjWcmuhnPv2JpXmgoxezKZfhH_0sChBof--BaaqSUukl9wWMW1bWCyFyU5qNczhQk3ANlhaLiSgXsqD-NKI3ObJjB-26fnOZb9QskCqrPW1lEtwgb9-skMAfGlh5kaDOKjYKI64DPSMMXpSiJEDM-7DK-TFfm0QfPcoH-k-1C02NHlGWehVUn9FUJ0TAiDxpKj28qOmYh7s1M7OU_h-Sso7LM-5zbftpcO6SINe81Gw9JPd7rKPCRxkw8ROSCCq-JH_zshM80kTK2nWcseGvhQ_4vKQIBp9PrAgCrGJHM160w","e":"AQAB","d":"AwS2NKo6iQS_k7GREg3X-kGh-zest00h4wYFcOHnFFlsczX47PlfArEeASxdAofrpi1soB0zd5UzRHnxAbH1vkexg076hoDQG__nzeQyEKu2K7xCZgdxW_V_cziH9gF3hZ-P2mfl9tPsng6OatElRt5BqaEingyY15ImiJK1-qi_LTx4gfwRfquKLbUgqJR4Tf6eKlwOzEo41Ilo26gnojNzWryB_XHG7lj6SngPDBJp7ty32je4Fv3A3hXt7JHDwloww6-xiRtUflDpSec4A-o-PHgbfoYLyM7mM4BDt4PM54EHm4u8WzypG0wNKDTiq4KSapei5xDbiG3RpngvAQ","p":"5kUHkGxnZvZT762Ex-0De2nYodAbbZNVR-eIPx2ng2VZmEbAU3cp_DxigpXWyQ0FwJ2Me8GvxnlbxJ7k7d-4AV2X8q6Q-UqXajHdudRU_QX05kPEgZ3xtPk5ekI0-u1BEQT7pY_gxlZC2mzXAcVLd-LwbVPuQEba5S4JMsjcHUE","q":"wJNa06-qZ2tWncGl7cfJdO-SJ_H3taowMhh-RsJmeVefjjN3pfVjjE0wG_rIP-BjjCB9OhvSnI8LDjoNu8uIg090DYnA6IUfZpWo3zjgedeyqQyXFVjjVQkn98zgp5NFLpuitZsl9-EHhh7JaZDCwaJ527MN3VCoQxeI75ggjxM","dp":"HQTH_kBbC5OxYjwIxrUswinFnia-viFaFvSrq-CN0rY8Az-vTxVuWhY2B-TgK3gTqIFyScpP34A9u1qW2Q9fffSQiInNRU1MJZrhKWED0NsmULprkjYYVsktoCWlzZWGpKFvIR8voW8Pf71FnziA2TvlNrHkDX-gaE9T422Cp8E","dq":"owJYqMWS1dYLTKBlx0ANbHl6W2u7xb_Y6h7HjTfzLBWazvEL_6QW7uVLqvN-XGuheDTsK6rvfWyr7BACHgvsc1JnJyqK64f8C4b1mnZ3tUt7RROONBi43ftRJLX9GHxV3F0LvvQkkI2gI8ydq0lJQkU5J1qKiuNCewBJ_p3kOZc","qi":"hNAZV6aWEEWfB1HkrfdtO6sjq9ceEod55ez82I1ZNgoKle8gpRkh3vw2EIJ_5lcw57s5rw8G-sCQPG1AQSZ6u9aURwHkIXjpIhLAlv6gvKkCh0smPPvnSiltJKOJsuHkrD6rGkV1f-MlCS51lKlk9xShQzkRidkNd4BUh0a7ktA"}]} \ No newline at end of file diff --git a/src/main/resources/配置详情.yml b/src/main/resources/配置详情.yml index 7f0b7e35f..03ca320c7 100644 --- a/src/main/resources/配置详情.yml +++ b/src/main/resources/配置详情.yml @@ -265,6 +265,9 @@ user-settings: # 这允许服务器防止客户端发起的基于 TCP 的拒绝服务攻击(即发起数百个客户端事务)。 # 如果为 true(默认作),则堆栈将保持套接字打开,以便以牺牲线程和内存资源为代价来最大化性能 - 使自身容易受到 DOS 攻击。 sip-cache-server-connections: true + # 处理报警消息时,会缓存通道数据,如果超出则丢弃低热度消息,被丢弃的通道下次使用就需要重新查询数据库,默认10000, + # 建议根据实际情况调整,过大可能会占用较多内存,过小可能会增加数据库查询压力, + alarm-catch-size: 10000 # 关闭在线文档(生产环境建议关闭) springdoc: diff --git a/更新内容 b/更新内容 new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/更新内容 @@ -0,0 +1 @@ +