完善自述文件

This commit is contained in:
2022-01-25 16:34:22 +08:00
parent cb418ba35a
commit 95b41916dc
4 changed files with 316 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
## network-spring-boot-starter
### 简介
本模块对`HttpClient`进行了封装实现了GET、POST、PUT、DELETE等Http请求的同步和异步方法
### 引入
```java
<dependency>
<groupId>com.hxuanyu</groupId>
<artifactId>network-spring-boot-starter</artifactId>
<version>1</version>
</dependency>
```
### 使用
- 引入`HttpService`对象
```java
@Resource
HttpService httpService;
```
- 调用相关方法
```java
Msg<String> msg = httpService.doGet("https://baidu.com");
if (msg.isSuccess()) {
logger.info(msg.toString());
}
```
- 本模块依赖了common-spring-boot-starter模块引入本模块后会自动引入common模块下的相关类同时`HttpService`的方法返回值使用了common模块下的`Msg`统一封装