# 微信api springboot 启动器
**Repository Path**: twoke/wechat_api_springboot_starter
## Basic Information
- **Project Name**: 微信api springboot 启动器
- **Description**: 封装了 微信api的SpringBoot启动器
- **Primary Language**: Java
- **License**: Apache-2.0
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 2
- **Forks**: 0
- **Created**: 2020-07-01
- **Last Updated**: 2021-12-25
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# 微信API封装--SpringBoot启动器版
## 开发环境
```shell
maven 3.5+
jdk 1.8+
SpringBoot 2.2.6
```
## 使用说明
### 1. 安装启动器到本地仓库
**1.1 克隆源码**
```shell
git clone https://gitee.com/twoke/wechat_api_springboot_starter.git
```

**1.2 新建项目,导入模块**
建议删除.git文件


导入模块后的整体项目架构
1.
**1.3 安装到本地maven库**
1.安装wechat-sdk-spring-boot-autoconfiguration

2.安装wechat-sdk-spring-boot-starter

### 2.创建SpringBoot项目
**2.1 创建项目**
命名按照你的意思写,我随意

**2.2 添加模块**
根据你自己的需求

**2.3 结构**

### 3.开始使用
**3.1 引入依赖**
```xml
com.twoke
wechat-sdk-spring-boot-starter
1.0.0
```
**3.2 填写配置**
在application.yml中添加appid和私钥

填写完毕

**3.3 创建控制层,快速实现获取微信接口的调用凭证**
```java
/**
* @author TwoKe
* @desc 控制器
* @date 2020/7/1
*/
@RestController
public class TempController {
/**
* 启动器中微信授权的API操作类
*/
@Autowired
private IWeiXinAuthApi weiXinAuthApi;
@RequestMapping("/getAccessToKen")
public Map getAccessToken(){
//封装返回信息
Map map = new HashMap<>();
/*
* 返回access_token
*/
String accessToken = weiXinAuthApi.getAccessToken();
map.put("access_token",accessToken);
return map;
}
}
```

其他api方法将在后续推出,目前已集成的方法有
1. 订阅消息
2. 登录认证
3. 小程序码以及小程序二维码
4. 接口调用凭证的获取