IpRegion IP地址转换为行政区域

Ip138 ,Ip360 ,Ipchaxun ,Ipcn ,Pconline & Local
This commit is contained in:
MaxKey
2022-03-01 19:24:05 +08:00
parent 9a3fe2ba35
commit 13102d53b7
32 changed files with 604 additions and 73 deletions

View File

@@ -0,0 +1,17 @@
package org.maxkey.web.ipregion;
import org.junit.Test;
public class IpRegionFactoryTest {
@Test
public void test(){
System.out.println(IpRegionFactory.getFactory().getLocation(
IpRegionFactory.getFactory().region("127.0.0.1")
));
System.out.println(IpRegionFactory.getFactory().getLocation(
IpRegionFactory.getFactory().region("117.155.70.59")
));
}
}

View File

@@ -0,0 +1,13 @@
package org.maxkey.web.ipregion;
import org.junit.Test;
public class IpRegionIp138Test {
@Test
public void test(){
IpRegion ipRegion = new IpRegionIp138();
System.out.println(ipRegion.region("117.155.70.59"));
}
}

View File

@@ -0,0 +1,13 @@
package org.maxkey.web.ipregion;
import org.junit.Test;
public class IpRegionIp360Test {
@Test
public void test(){
IpRegion ipRegion = new IpRegionIp360();
System.out.println(ipRegion.region("117.155.70.59"));
}
}

View File

@@ -0,0 +1,13 @@
package org.maxkey.web.ipregion;
import org.junit.Test;
public class IpRegionIpchaxunTest {
@Test
public void test(){
IpRegion ipRegion = new IpRegionIpchaxun();
System.out.println(ipRegion.region("117.155.70.59"));
}
}

View File

@@ -0,0 +1,13 @@
package org.maxkey.web.ipregion;
import org.junit.Test;
public class IpRegionIpcnTest {
@Test
public void test(){
IpRegion ipRegion = new IpRegionIpcn();
System.out.println(ipRegion.region("117.155.70.59"));
}
}

View File

@@ -0,0 +1,13 @@
package org.maxkey.web.ipregion;
import org.junit.Test;
public class IpRegionPconlineTest {
@Test
public void test(){
IpRegion ipRegion = new IpRegionPconline();
System.out.println(ipRegion.region("117.155.70.59"));
}
}