IpRegion IP地址转换为行政区域
Ip138 ,Ip360 ,Ipchaxun ,Ipcn ,Pconline & Local
This commit is contained in:
@@ -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")
|
||||
));
|
||||
}
|
||||
}
|
||||
@@ -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"));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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"));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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"));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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"));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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"));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user