fix:refactor the project and optimize the configuration loading method

This commit is contained in:
wangchengcheng
2024-01-12 18:42:21 +08:00
parent a17666abff
commit 77ec061844
37 changed files with 978 additions and 1635 deletions

View File

@@ -5,8 +5,6 @@ import com.zdjizhi.common.DosDetectionThreshold;
import com.zdjizhi.common.DosEventLog;
import com.zdjizhi.common.DosSketchLog;
import com.zdjizhi.utils.IpLookupUtils;
import com.zdjizhi.utils.SnowflakeId;
import org.apache.commons.lang3.StringUtils;
import org.junit.Test;
@@ -174,10 +172,10 @@ public class DosDetectionTest {
String[] ipArr = sourceIpList.split(",");
HashSet<String> countrySet = new HashSet<>();
for (String ip : ipArr) {
String country = IpLookupUtils.getCountryLookup(ip);
if (StringUtil.isNotBlank(country)){
countrySet.add(country);
}
// String country = IpLookupUtils.getCountryLookup(ip);
// if (StringUtil.isNotBlank(country)){
// countrySet.add(country);
// }
}
countryList = StringUtils.join(countrySet, ", ");
return countryList;