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