记录一下
Resource resource = new ClassPathResource("ipdb/ip2region.xdb");
Path tempFile = Files.createTempFile("ip2region", ".xdb");
try (InputStream inputStream = resource.getInputStream()) {
Files.copy(inputStream, tempFile, StandardCopyOption.REPLACE_EXISTING);
}
searcher = Searcher.newWithFileOnly(tempFile.toString());