pack all the service class to service package
This commit is contained in:
parent
9d67e3fcad
commit
54628265b3
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
@ -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;
|
||||
|
|
@ -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;
|
||||
|
||||
|
|
@ -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;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.lionsoul.ip2region;
|
||||
package org.lionsoul.ip2region.service;
|
||||
import java.io.IOException;
|
||||
import java.security.CodeSource;
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.lionsoul.ip2region;
|
||||
package org.lionsoul.ip2region.service;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.lionsoul.ip2region;
|
||||
package org.lionsoul.ip2region.service;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.lionsoul.ip2region.xdb.Log;
|
||||
Loading…
Reference in New Issue