域名相关表去掉is_accessible字段
This commit is contained in:
@@ -3,16 +3,10 @@ package com.mesasoft.cn.sketch.util;
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.core.io.resource.ResourceUtil;
|
||||
import cn.hutool.log.Log;
|
||||
import com.mesasoft.cn.sketch.config.AppConfig;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import sun.net.util.IPAddressUtil;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@@ -26,15 +20,17 @@ public class ValidationUtils {
|
||||
|
||||
private static String tldFilePath;
|
||||
|
||||
// @Value("${sketch.tld.file}")
|
||||
// public void setTldFilePath(String ttlFilePath) {
|
||||
// this.tldFilePath = ttlFilePath;
|
||||
// if (StringUtils.isBlank(ttlFilePath) || !FileUtil.exist(ttlFilePath)) {
|
||||
// this.tldFilePath = ResourceUtil.getResource("public_suffix_list_only.dat").getPath();
|
||||
// }
|
||||
// }
|
||||
|
||||
static {
|
||||
tldFilePath = ResourceUtil.getResource("public_suffix_list_only.dat").getPath();
|
||||
try {
|
||||
tldFilePath = new File("").getCanonicalPath()+"/config/public_suffix_list_only.dat";
|
||||
} catch (IOException e) {
|
||||
logger.error(e);
|
||||
}
|
||||
|
||||
if(!FileUtil.exist(tldFilePath)){
|
||||
tldFilePath = ResourceUtil.getResource("public_suffix_list_only.dat").getPath();
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 获取二级域名
|
||||
|
||||
Reference in New Issue
Block a user