### Question:
Ip2AddressUtil { public static String getAddressInLocal(String ip) { if (StrUtil.equals(ip, IpUtil.LOCAL_INNER_LOOP_IP)) { ip = IpUtil.LOCAL_IP; } String address = ""; boolean ipAddress = Util.isIpAddress(ip); if (!ipAddress) { return address; } try { DbConfig config = new DbConfig(); DbSearcher searcher = new DbSearcher(config, ResourceUtil.getResource("ip/ip2region.db").getFile()); DataBlock dataBlock = searcher.memorySearch(ip); String region = dataBlock.getRegion(); List<String> regionList = Splitter.on("|").splitToList(region); List<String> regionListFilter = regionList.stream() .filter(s -> !StrUtil.equals("0", s)) .distinct() .collect(Collectors.toList()); address = Joiner.on("|").join(regionListFilter); } catch (Exception e) { log.error("【获取地理位置】发生异常:", e); } return address; }  static String getAddressInLocal(String ip); static String getAddressOnNetByTaoBao(String ip);  }### Answer:
@Test public void testGetAddressInLocal(){ log.info("测试ip2region"); String address1 = Ip2AddressUtil.getAddressInLocal(ip1); log.info("【address1】= {}", address1); String address2 = Ip2AddressUtil.getAddressInLocal(ip2); log.info("【address2】= {}", address2); }