# wx_api
**Repository Path**: piggsoft/wx_api
## Basic Information
- **Project Name**: wx_api
- **Description**: 微信SDK
- **Primary Language**: Java
- **License**: Apache-2.0
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 26
- **Forks**: 4
- **Created**: 2015-11-24
- **Last Updated**: 2021-10-15
## Categories & Tags
**Categories**: weixin-dev
**Tags**: None
## README
#微信SDK
##写在之前
QQ群:451700092
* [微信公众平台开发者文档](http://mp.weixin.qq.com/wiki/home/index.html)
* [Demo](http://git.oschina.net/piggsoft/WX_API_demo)
* [github 开发提交流程](how_to_use_github.md)
####Get Start
1. 引入包
2. 在web.xml中加入,用来接收来自微信服务器发送过来的消息
```xml
wxFilter
com.piggsoft.filter.WXFilter
wxConfigLocations
classpath:wx.customer.spring.xml
wxFilter
/xx/xx
```
WXFilter是被动消息和事件的主入口,```url-pattern```可以任意配置,只需和公众号中的配置一致
3. ````classpath````下加入````wx.customer.properties````配置
```
#用户唯一凭证
appid = 123123
#用户唯一凭证密钥
secret = 1231231
```
wx.properties 是整个SDK包的主配置文件,可以覆盖其中的任意配置(除非是你必须这样做)
4. ````classpath````下加入````wx.customer.spring.xml````配置
在其中加入:
```xml
```
要求该类实现 ```com.piggsoft.listener.WXEventListener```