pack all the service class to service package

This commit is contained in:
lionsoul2014 2025-12-05 23:33:23 +08:00
parent 9d67e3fcad
commit 54628265b3
9 changed files with 12 additions and 9 deletions

View File

@ -7,13 +7,16 @@
<dependency>
<groupId>org.lionsoul</groupId>
<artifactId>ip2region</artifactId>
<version>3.2.0</version>
<version>3.2.2</version>
</dependency>
```
### 关于查询服务
`3.2.0` 版本开始提供了一个双协议兼容且并发安全的 `Ip2Region` 查询服务,**建议优先使用该方式来进行查询调用**,具体使用方式如下:
```java
import org.lionsoul.ip2region.service.Config;
import org.lionsoul.ip2region.service.Ip2Region;
// 1, 创建 v4 的配置:指定缓存策略和 v4 的 xdb 文件路径
final Config v4Config = Config.custom()
.setCachePolicy(Config.VIndexCache) // 指定缓存策略: NoCache / VIndexCache / BufferCache

View File

@ -4,7 +4,7 @@
<groupId>org.lionsoul</groupId>
<artifactId>ip2region</artifactId>
<version>3.2.0</version>
<version>3.2.2</version>
<packaging>jar</packaging>
<name>ip2region</name>

View File

@ -1,7 +1,7 @@
// Copyright 2022 The Ip2Region Authors. All rights reserved.
// Use of this source code is governed by a Apache2.0-style
// license that can be found in the LICENSE file.
package org.lionsoul.ip2region;
package org.lionsoul.ip2region.service;
import java.io.IOException;

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a Apache2.0-style
// license that can be found in the LICENSE file.
package org.lionsoul.ip2region;
package org.lionsoul.ip2region.service;
import java.io.IOException;
import java.io.RandomAccessFile;

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a Apache2.0-style
// license that can be found in the LICENSE file.
package org.lionsoul.ip2region;
package org.lionsoul.ip2region.service;
import java.io.IOException;

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a Apache2.0-style
// license that can be found in the LICENSE file.
package org.lionsoul.ip2region;
package org.lionsoul.ip2region.service;
import java.io.IOException;
import java.util.Iterator;

View File

@ -1,4 +1,4 @@
package org.lionsoul.ip2region;
package org.lionsoul.ip2region.service;
import java.io.IOException;
import java.security.CodeSource;

View File

@ -1,4 +1,4 @@
package org.lionsoul.ip2region;
package org.lionsoul.ip2region.service;
import static org.junit.Assert.assertEquals;

View File

@ -1,4 +1,4 @@
package org.lionsoul.ip2region;
package org.lionsoul.ip2region.service;
import org.junit.Test;
import org.lionsoul.ip2region.xdb.Log;