您的位置:首页 >SpringBoot如何使用ip2region获取地理位置信息
发布于2023-05-12 阅读(0)
扫一扫,手机访问
ip2region,准确率99.9%的离线IP地址定位库,0.0x毫秒级查询,数据库文件大小只有1.5M,提供了java,php,c,python,nodejs,golang,c#等查询绑定和Binary,B树,内存三种查询算法
<!-- Ip地址获取 --> <dependency> <groupId>net.dreamlu</groupId> <artifactId>mica-ip2region</artifactId> <version>2.5.4</version> </dependency>
@Autowired
private Ip2regionSearcher ip2regionSearcher;
/**
* 获取地理位置信息
*
* @param ip
* @return
*/
@GetMapping("test")
public String test(String ip) {
return ip2regionSearcher.getAddress(ip);
}
售后无忧
立即购买>office旗舰店
售后无忧
立即购买>office旗舰店
售后无忧
立即购买>office旗舰店
售后无忧
立即购买>office旗舰店
正版软件
正版软件
正版软件
正版软件
正版软件
1
2
3
7
9