Skip to content

Commit c050383

Browse files
committed
完善readme
Signed-off-by: qianjc <leviqian@sina.com>
1 parent 3e6df07 commit c050383

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
11
# 项目介绍
22
自定义的spring-boot的hbase starter,为hbase的query和更新等操作提供简易的api并集成spring-boot的auto configuration
3+
# 打包
4+
修改相关的maven私服地址
5+
```shell
6+
gradle clean install uploadArchives
7+
```
38
# 使用方式
9+
## 依赖
10+
```shell
11+
compile "jthink:spring-boot-starter-hbase:0.0.1"
12+
```
413
## 集成
514
在spring-boot项目的application.properties文件中加入spring.data.hbase.quorum配置项,并赋予正确的值
615
## 使用
716
### query
8-
17+
1. 将上述配置项赋予正确的值
18+
2. dto定义
919
```java
1020
public class PeopleDto {
1121

@@ -32,6 +42,7 @@ public class PeopleDto {
3242
}
3343
}
3444
```
45+
3. RowMapper定义
3546
```java
3647
import com.jthink.skyeye.data.hbase.api.RowMapper;
3748
import org.apache.hadoop.hbase.client.Result;
@@ -54,6 +65,7 @@ public class PeopleRowMapper implements RowMapper<PeopleDto> {
5465
}
5566
}
5667
```
68+
4. query操作
5769
```java
5870
import com.jthink.skyeye.data.hbase.api.HbaseTemplate;
5971
import org.apache.hadoop.hbase.client.Scan;
@@ -82,6 +94,8 @@ public class QueryService {
8294
}
8395
```
8496
### update等
97+
1. 将上述配置项赋予正确的值
98+
2. update、delete、put操作
8599
```java
86100
import com.jthink.skyeye.data.hbase.api.HbaseTemplate;
87101
import org.apache.hadoop.hbase.client.Delete;
@@ -126,4 +140,4 @@ public class QueryService {
126140
```
127141

128142
### 其他
129-
不可以满足需求的可以使用hbaseTemplate暴露出来的getConnection()方法
143+
不可以满足需求的可以使用hbaseTemplate暴露出来的getConnection()方法

0 commit comments

Comments
 (0)