参考 https://www.jianshu.com/p/1b1a018ae729
参考 https://cloud.tencent.com/developer/article/1049202
GeoLite2.mmdb官方下载地址
https://dev.maxmind.com/geoip/geoip2/geolite2/
需要注册
maven依赖
<dependency>
<groupId>com.maxmind.geoip2</groupId>
<artifactId>geoip2</artifactId>
<version>v2.3.0</version>
</dependency>
使用代码
//GeoIP2-City 数据库文件
File database = n