From fc459586349c89155d09fb4afbe49c6361723818 Mon Sep 17 00:00:00 2001 From: wangxin Date: Fri, 27 Jul 2018 10:25:31 +0800 Subject: [PATCH] =?UTF-8?q?MaatCfg=E9=83=A8=E5=88=86=E7=BC=BA=E7=9C=81?= =?UTF-8?q?=E5=80=BC=E6=8F=90=E5=88=B0=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E4=B8=AD=EF=BC=8CdoLog=E7=BC=BA=E7=9C=81=E5=80=BC=E6=94=B9?= =?UTF-8?q?=E4=B8=BA1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/nis/domain/maat/MaatCfg.java | 8 ++++---- src/main/java/com/nis/util/Constants.java | 7 +++++++ src/main/resources/nis.properties | 8 +++++++- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/nis/domain/maat/MaatCfg.java b/src/main/java/com/nis/domain/maat/MaatCfg.java index 9321277ff..0a0792ce7 100644 --- a/src/main/java/com/nis/domain/maat/MaatCfg.java +++ b/src/main/java/com/nis/domain/maat/MaatCfg.java @@ -663,10 +663,10 @@ public class MaatCfg implements Serializable { this.requestId = requestId; } public void initDefaultValue() { - this.doLog=2; - this.doBlackList=1; - this.configPercent=100; - this.configOption=1; + this.doLog=Constants.MAAT_CFG_DOLOG_DEFAULT; + this.doBlackList=Constants.MAAT_CFG_DOLOG_DOBLACKLIST_DEFAULT; + this.configPercent=Constants.MAAT_CFG_DOLOG_CONFIGPERCENT_DEFAULT; + this.configOption=Constants.MAAT_CFG_DOLOG_CONFIGOPTION_DEFAULT; this.startTime=new Date(); this.endTime=DateUtils.addYears(this.startTime, 2099-Integer.parseInt(DateUtils.getYear())); this.fatherCfgId=0; diff --git a/src/main/java/com/nis/util/Constants.java b/src/main/java/com/nis/util/Constants.java index 09eaee3b3..55d124bec 100644 --- a/src/main/java/com/nis/util/Constants.java +++ b/src/main/java/com/nis/util/Constants.java @@ -7,6 +7,13 @@ import java.util.Map; import com.google.gson.GsonBuilder; public final class Constants { + /** + * MaatConfig 默认值 + */ + public static Integer MAAT_CFG_DOLOG_DEFAULT=Configurations.getIntProperty("maat_cfg_dolog_default", 1); + public static Integer MAAT_CFG_DOLOG_DOBLACKLIST_DEFAULT=Configurations.getIntProperty("maat_cfg_dolog_doblacklist_default", 1); + public static Integer MAAT_CFG_DOLOG_CONFIGPERCENT_DEFAULT=Configurations.getIntProperty("maat_cfg_dolog_configpercent_default", 100); + public static Integer MAAT_CFG_DOLOG_CONFIGOPTION_DEFAULT=Configurations.getIntProperty("maat_cfg_dolog_configoption_default", 1); /** * iP默认值 */ diff --git a/src/main/resources/nis.properties b/src/main/resources/nis.properties index 481453180..42fa00f47 100644 --- a/src/main/resources/nis.properties +++ b/src/main/resources/nis.properties @@ -422,5 +422,11 @@ ipv4_default_ip_subnet_value=0.0.0.0/32 ipv6_default_ip_subnet_value=::/64 ipv4_default_ip_range_value=0.0.0.0-0.0.0.0 ipv6_default_ip_range_value=::-:: +#端口默认值 port_default=0 -port_mask_default=0/65535 \ No newline at end of file +port_mask_default=0/65535 +#MAAT CFG 一些默认值 +maat_cfg_dolog_default=1 +maat_cfg_dolog_doblacklist_default=1 +maat_cfg_dolog_configpercent_default=100 +maat_cfg_dolog_configoption_default=1 \ No newline at end of file