Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
8281b63
Update README.md
binarywang Sep 30, 2016
2ae95e4
clean code
binarywang Oct 1, 2016
e9b9209
Merge pull request #49 from wechat-group/master
binarywang Oct 2, 2016
118e4c7
提取支付公用接口地址常量
binarywang Oct 3, 2016
f2655e5
移除无用代码
binarywang Oct 4, 2016
392429a
为WxErrorException添加一个构造方法,用于必要时打印出错误根源信息
binarywang Oct 4, 2016
a4b0fdc
增加商户平台的测试相关的配置参数
binarywang Oct 5, 2016
dabafc2
实现企业付款的接口,暂时未调通,因缺少证书 for issue #50
binarywang Oct 6, 2016
782bc6a
Update README.md
binarywang Oct 7, 2016
03f029c
加入原作者信息 https://github.com/chanjarster/weixin-java-tools/pull/277
binarywang Oct 7, 2016
d9a32d8
Update README.md
binarywang Oct 7, 2016
5aba474
格式化javadoc,添加pre标签
binarywang Oct 8, 2016
ff20ecb
替换网址共同部分为已定义的常量
binarywang Oct 8, 2016
d9d0f54
格式化javadoc
binarywang Oct 8, 2016
10ce6a8
添加缺失的单元测试
binarywang Oct 8, 2016
5fe1c06
重构微信支付申请退款接口 for issue #25
binarywang Oct 8, 2016
a0dc8ca
重构微信支付申请退款接口 for issue #25
binarywang Oct 8, 2016
049eb95
格式化javadoc
binarywang Oct 8, 2016
d933ab4
重构微信支付申请退款接口 for issue #25
binarywang Oct 8, 2016
076ae4f
fix a typo
binarywang Oct 9, 2016
a464289
更改版本,去掉一些无用的jar依赖
binarywang Oct 9, 2016
f7f7d12
发送红包接口增加证书
binarywang Oct 9, 2016
3d9bc6b
调整参数位置
binarywang Oct 9, 2016
25064c5
修正me.chanjar.weixin.common.util.http.DefaultApacheHttpClientBuilder#p…
Oct 10, 2016
ab9cc45
Merge branch 'develop' of https://github.com/wechat-group/weixin-java…
Oct 10, 2016
510cad2
Merge pull request #60 from kakotor/develop
binarywang Oct 10, 2016
a345f8a
issue #58 : remove fluent-hc for optimization
Oct 10, 2016
636ae33
Update README.md
binarywang Oct 11, 2016
e8d368f
toString()方法替换掉较新版本的 commons-lang3引入的 ToStringStyle.JSON_STYLE
binarywang Oct 12, 2016
cd02627
修改方法返回类型,保证标签Id与其他地方一致
binarywang Oct 13, 2016
2af7bee
修复错误的单元测试代码
binarywang Oct 13, 2016
87f023e
CP部分bean实现序列号接口,并添加serialVersionUID to fix #66
binarywang Oct 14, 2016
6682f5f
修复错误的参数名称: agendid -> agentid
binarywang Oct 14, 2016
77db3c2
将模板消息相关接口代码移到单独的service,并作相应重构调整,增加单元测试 for issue #63
binarywang Oct 14, 2016
d7298ab
添加获得模板ID的接口方法实现 for issue #63
binarywang Oct 17, 2016
6dc0481
添加获得模板列表的接口方法,并重构模板消息相关类包结构 for issue #63
binarywang Oct 17, 2016
550bbe3
update readme
binarywang Oct 17, 2016
acc1291
添加删除模板的接口方法实现 for issue #63
binarywang Oct 18, 2016
f54097e
添加微信认证事件推送消息的支持,包括常量的定义以及接收消息字段的定义。 finish #63
binarywang Oct 18, 2016
f0192cc
实现查询企业付款的API。 finish #51
binarywang Oct 19, 2016
81b7a2c
Fix issue #62 : add osgi support
Oct 20, 2016
e68abe7
Merge branch 'develop' of https://github.com/wechat-group/weixin-java…
Oct 20, 2016
9ee6d25
ignore temp files on mac os
Oct 20, 2016
4477e44
根据javabean规范,保留一个get方法,以便用于一些反射的使用场景
Oct 20, 2016
5885ce8
Update README.md
binarywang Oct 21, 2016
4b88c3d
去掉joor的依赖,并重构相关反射代码 for #58
binarywang Oct 21, 2016
3448eda
gradle配置里 去掉joor的依赖 for #58
binarywang Oct 21, 2016
6757af8
Update README.md
binarywang Oct 23, 2016
773c764
升级commons-lang3版本号
binarywang Oct 24, 2016
dff627b
Update README.md
binarywang Oct 24, 2016
e30138f
#53 实现微信支付查询订单的接口,并重构规范化微信支付相关接口类的命名
binarywang Oct 25, 2016
585cee0
修改pom文件,增加贡献者信息
binarywang Oct 25, 2016
912ef62
重构客服消息相关命名,替换不合理的命名:CustomMessage -> KefuMessage
binarywang Oct 25, 2016
a3ada2c
重构规范化微信支付相关接口类的命名
binarywang Oct 25, 2016
8a376f5
重构规范化微信支付相关接口类
binarywang Oct 25, 2016
11452e6
清理代码
binarywang Oct 25, 2016
b23b764
添加对客服消息发送(点击跳转到图文消息页面) 图文消息的支持 #67
binarywang Oct 25, 2016
4aae0c6
修改pom文件,增加贡献者信息
binarywang Oct 25, 2016
903a69d
修改pom文件,增加贡献者信息
binarywang Oct 25, 2016
4383552
修改pom文件,增加贡献者信息
binarywang Oct 25, 2016
fbefe7f
修改pom文件,增加贡献者信息
binarywang Oct 26, 2016
cb1249f
添加被误移除的getJSSDKCallbackData方法
binarywang Oct 26, 2016
5d63b1e
添加httpclient配置参数的set方法及说明
Oct 26, 2016
3d013c1
修复将prepare方法移动到构造方法中导致代理配置设置无效的问题,将prepare方法改为同步执行,防止被多次调用.
Oct 26, 2016
ba6b7da
素材相关代码补充完善javadoc注释,并重构包结构
binarywang Oct 26, 2016
44a1dfa
重构bean和builder的包结构
binarywang Oct 26, 2016
8cbe207
修复素材代码调整后的代码
binarywang Oct 26, 2016
fa7acc3
Merge pull request #69 from kakotor/develop
binarywang Oct 26, 2016
e89d009
移除jodd #58
binarywang Oct 27, 2016
ed17c2a
增加根据openid获取用户信息的重载方法,不指定语言,默认使用zh_CN
binarywang Oct 27, 2016
d30ac74
移除jodd-http for osgi #58
binarywang Oct 27, 2016
a210b85
微信消息里增加缺少的MenuId
binarywang Oct 27, 2016
aa35c74
调整接口位置
binarywang Oct 27, 2016
ffa8ccd
Update README.md
binarywang Oct 27, 2016
b9ea8dc
Update README.md
binarywang Oct 27, 2016
ecba1ec
修正UserService的javadoc
binarywang Oct 27, 2016
4959966
实现微信支付关闭订单的接口 #54
binarywang Oct 27, 2016
b84a2ec
引入自定义ToString工具类和方法,便于查看部分bean对象值
binarywang Oct 27, 2016
866155d
修复部分代码,使用apache commons里现成的工具方法
binarywang Oct 27, 2016
a0d0cb7
更换jetty版本,老版本会报莫名异常错误
binarywang Oct 28, 2016
639206c
修复BeanUtils工具类
binarywang Oct 29, 2016
1ceb4bf
尽量使用接口引用 use interface where possible
binarywang Oct 29, 2016
d88a8d3
抽取获取代理对象的方法到接口中,方便微信支付调用,并优化部分代码
binarywang Oct 29, 2016
4fa672d
微信支付接口增加日志
binarywang Oct 29, 2016
c82b9f0
优化重构微信支付接口对结果的异常错误输出
binarywang Oct 29, 2016
a9befa5
Update WxMpPayServiceImpl.java
binarywang Oct 31, 2016
a755c41
更新版本号,准备生成新版本2.3.0
binarywang Oct 31, 2016
9ca1955
更新版本号,准备生成新版本2.3.0
binarywang Oct 31, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 49 additions & 28 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,28 +1,49 @@
*.class
test-output

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.ear

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

target
bin
.project
.classpath
.settings

sw-pom.xml
*.iml
test-config.xml
.idea
/.gradle/
/gradle/
*.bat
/gradlew
*.class
test-output

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.ear

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

target
bin
.project
.classpath
.settings

sw-pom.xml
*.iml
test-config.xml
.idea
/.gradle/
/gradle/
*.bat
/gradlew

# OSX
# Icon must end with two \r
Icon


._*
.DS_Store
.AppleDouble
.LSOverride
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
37 changes: 22 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,30 @@
# Weixin Java Tools 微信公众号/企业号开发Java SDK
## [![Open Source Love](https://badges.frapsoft.com/os/v1/open-source.svg?v=103)](https://github.com/ellerbrock/open-source-badge/) ![Maven Central](https://img.shields.io/maven-central/v/com.github.binarywang/weixin-java-parent.svg) [![Build Status](https://travis-ci.org/wechat-group/weixin-java-tools.svg?branch=develop)](https://travis-ci.org/wechat-group/weixin-java-tools)
## ![Maven Central](https://img.shields.io/maven-central/v/com.github.binarywang/weixin-java-parent.svg) [![Build Status](https://travis-ci.org/wechat-group/weixin-java-tools.svg?branch=develop)](https://travis-ci.org/wechat-group/weixin-java-tools) [![Join QQ Group](http://pub.idqqimg.com/wpa/images/group.png)](http://jq.qq.com/?_wv=1027&k=40lRskK)


### 注意:
1. ***本项目Fork自chanjarster/weixin-java-tools,但由于原项目已停止维护,故单独维护和发布,且发布到maven上的groupId也会不同,详细信息见下文。***
1. ***自2.0.0版本以来,公众号的接口调整比较大,主要是为了解决主接口类过于庞大不方便管理的问题,将接口实现代码按模块进行拆分。***
1. 最新更新:2016-09-30 发布2.2.0正式版!
1. 本SDK要求的最低JDK版本是7,为满足少量还在使用JDK6的用户的需求,特意抽出独立的代码分支项目,请参考 https://github.com/binarywang/weixin-java-tools-for-jdk6 ,其他更早的JDK版本则需要自己改造实现;
1. 最新更新:2016-10-31 发布2.3.0正式版!

===========

## 开发交流方式:
1. ***入群须知:为保证入群成员质量,请申请入群前,先Star本项目,然后在申请入群时,输入您的Github帐号ID,以便管理员核对,ID即你的github主页地址https://github.com/XXXX 中最后的部分XXXX的内容,或者在github网页右上角点击头像后查看Signed in as后方内容。***
1. QQ群:343954419 [![Join QQ Group](http://pub.idqqimg.com/wpa/images/group.png)](http://shang.qq.com/wpa/qunwpa?idkey=078f7a153d243853e24cf2b542e7a6ccbf2a592bc138080f84d11297f736ec46)
1. 微信群: 因二维码有时间限制,如有想加入微信群的,请入QQ群后咨询获取最新入群二维码;
## 开发交流方式及注意事项:
1. QQ群:343954419 [![Join QQ Group](http://pub.idqqimg.com/wpa/images/group.png)](http://jq.qq.com/?_wv=1027&k=40lRskK)
1. 微信群: 因微信群已达到100人限制,故如有想加入微信群的,请入QQ群后联系管理员,提供微信号以便邀请加入;
1. 新手提问前,请先阅读此文章:http://t.cn/RV93MRB
1. 寻求帮助时需贴代码或大长串异常信息的,请利用http://paste.ubuntu.com
1. 有功能需求或由于微信官方接口调整导致的代码问题,可以直接提出issue,便于讨论追踪问题;
1. 详细开发文档请看 [Wiki](https://github.com/wechat-group/weixin-java-tools/wiki)。
1. 详细开发文档请看 [Wiki](https://github.com/wechat-group/weixin-java-tools/wiki),部分文档可能未能及时更新,如有发现,可以及时上报或者自行修改。
1. 微信公众号官方文档入口地址:http://mp.weixin.qq.com/wiki (注意,从网上搜到的文档有的虽然地址前面跟这个一样,但明显左侧菜单不一致,是旧的文档,注意不要看错了文档)。

===========

## 版本说明
1. 本项目定为每月发布一次正式版,版本号格式为X.X.0(如2.0.0,2.1.0等),月初或月底发布新版本,遇到重大问题需修复会及时提交新版本,欢迎大家随时提交Pull Request;
1. 本项目定为每月发布一次正式版,版本号格式为X.X.0(如2.1.0,2.2.0等),月初或月底发布新版本,遇到重大问题需修复会及时提交新版本,欢迎大家随时提交Pull Request;
1. BUG修复和新特性一般会先发布成小版本作为临时版本(如2.0.1,2.0.2等,即尾号不为0,以区别于正式版);
1. 目前最新版本号为 ![Maven Central](https://img.shields.io/maven-central/v/com.github.binarywang/weixin-java-parent.svg) ,也可以通过访问链接[【公众号】](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.github.binarywang%22%20AND%20a%3A%22weixin-java-mp%22) 、[【企业号】](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.github.binarywang%22%20AND%20a%3A%22weixin-java-cp%22)
1. 目前最新版本号为 ![Maven Central](https://img.shields.io/maven-central/v/com.github.binarywang/weixin-java-parent.svg) ,也可以通过访问链接 [【公众号】](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.github.binarywang%22%20AND%20a%3A%22weixin-java-mp%22) 、[【企业号】](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.github.binarywang%22%20AND%20a%3A%22weixin-java-cp%22)
分别查看所有最新的版本。

## Maven & Gradle
Expand All @@ -33,12 +36,12 @@ maven:
<dependency>
<groupId>com.github.binarywang</groupId>
<artifactId>weixin-java-mp</artifactId>
<version>2.2.0</version>
<version>2.3.0</version>
</dependency>
```
gradle:
```groovy
compile 'com.github.binarywang:weixin-java-mp:2.2.0'
compile 'com.github.binarywang:weixin-java-mp:2.3.0'
```

* 企业号:
Expand All @@ -48,26 +51,30 @@ maven:
<dependency>
<groupId>com.github.binarywang</groupId>
<artifactId>weixin-java-cp</artifactId>
<version>2.2.0</version>
<version>2.3.0</version>
</dependency>
```
gradle:
```groovy
compile 'com.github.binarywang:weixin-java-cp:2.2.0'
compile 'com.github.binarywang:weixin-java-cp:2.3.0'
```

===========

#### 本项目主要存放在github上,地址为 :
* https://github.com/wechat-group/weixin-java-tools
* ===========但同时会在其他几个网站同步更新,地址分别是:
* https://bitbucket.org/binarywang/weixin-java-tools
* http://git.oschina.net/binary/weixin-java-tools
* https://git.coding.net/binarywang/weixin-java-tools.git


## 目前可参考的Demo项目有两个:
===========
## 目前可参考的Demo项目有三个(目前都是公众号的,风格不同,欢迎提供更多的demo供新手参考):
1. https://github.com/wechat-group/weixin-mp-demo
1. https://github.com/wechat-group/weixin-mp-demo-springboot
1. https://github.com/wechat-group/weixin-java-tools-springmvc

===========
## 关于代码贡献
1. 非常欢迎和感谢对本项目发起Pull Request的同学,本项目代码风格为使用2个空格代表一个Tab,因此在提交代码时请注意一下,否则很容易在IDE格式化代码后与原代码产生大量diff,这样会给其他人阅读代码带来极大的困扰。
1. 为了便于设置,本项目引入editorconfig插件,请使用eclipse的同学在贡献代码前安装相关插件,IntelliJ IDEA则自带支持,无需额外安装插件。
Expand Down
5 changes: 1 addition & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ allprojects {
apply plugin: 'maven'

group = 'com.github.binarywang'
version = '2.2.0'
version = '2.3.0'
}

subprojects {
Expand All @@ -20,12 +20,9 @@ subprojects {

dependencies {
compile group: 'org.slf4j', name: 'slf4j-api', version:'1.7.10'
compile group: 'org.apache.httpcomponents', name: 'fluent-hc', version:'4.5'
compile group: 'org.apache.httpcomponents', name: 'httpmime', version:'4.5'
compile group: 'org.jodd', name: 'jodd-http', version:'3.6.7'
compile group: 'com.google.code.gson', name: 'gson', version:'2.7'
compile group: 'com.google.guava', name: 'guava', version:'19.0'
compile group: 'org.jooq', name: 'joor', version:'0.9.6'
compile group: 'commons-codec', name: 'commons-codec', version:'1.10'
compile group: 'commons-io', name: 'commons-io', version:'2.5'
compile group: 'org.apache.commons', name: 'commons-lang3', version:'3.4'
Expand Down
67 changes: 36 additions & 31 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.binarywang</groupId>
<artifactId>weixin-java-parent</artifactId>
<version>2.2.0</version>
<version>2.3.0</version>
<packaging>pom</packaging>
<name>WeiXin Java Tools - Parent</name>
<description>微信公众号、企业号上级POM</description>
<url>https://github.com/binarywang/weixin-java-tools</url>
<url>https://github.com/wechat-group/weixin-java-tools</url>

<licenses>
<license>
Expand All @@ -22,23 +22,51 @@
<developer>
<name>Daniel Qian</name>
<email>chanjarster@gmail.com</email>
<url>https://github.com/chanjarster</url>
</developer>
<developer>
<name>Binary Wang</name>
<email>binarywang@gmail.com</email>
<url>https://github.com/binarywang</url>
</developer>
<developer>
<name>gaigeshen</name>
<email>gaigeshen@qq.com</email>
<url>https://github.com/gaigeshen</url>
</developer>
<developer>
<name>Liu Mingbo</name>
<email>liumingbo2008@gmail.com</email>
<url>https://github.com/FirenzesEagle</url>
</developer>
<developer>
<name>kakotor</name>
<email>kakotor@gmail.com</email>
<url>https://github.com/kakotor</url>
</developer>
<developer>
<name>xiong</name>
<email>zhaoxiong.tan@gmail.com</email>
<url>https://github.com/ZhaoxiongTan</url>
</developer>
<developer>
<name>LiuJunGuang</name>
<email>aimilin@yeah.net</email>
<url>https://github.com/aimilin6688</url>
</developer>
</developers>

<scm>
<connection>scm:git:https://github.com/binarywang/weixin-java-tools.git</connection>
<developerConnection>scm:git:git@github.com:binarywang/weixin-java-tools.git</developerConnection>
<url>https://github.com/binarywang/weixin-java-tools</url>
<connection>scm:git:https://github.com/wechat-group/weixin-java-tools.git</connection>
<developerConnection>scm:git:git@github.com:wechat-group/weixin-java-tools.git</developerConnection>
<url>https://github.com/wechat-group/weixin-java-tools</url>
</scm>

<modules>
<module>weixin-java-common</module>
<module>weixin-java-cp</module>
<module>weixin-java-mp</module>
<module>weixin-java-osgi</module>
</modules>

<properties>
Expand All @@ -48,16 +76,13 @@
<httpclient.version>4.5</httpclient.version>
<slf4j.version>1.7.10</slf4j.version>
<logback.version>1.1.2</logback.version>
<jodd-http.version>3.6.7</jodd-http.version>
<jedis.version>2.9.0</jedis.version>
<gson.version>2.7</gson.version>
<guava.version>19.0</guava.version>
<joor.version>0.9.6</joor.version>
<commons-lang3.version>3.4</commons-lang3.version>
<commons-lang3.version>3.5</commons-lang3.version>
<commons-io.version>2.5</commons-io.version>
<commons-codec.version>1.10</commons-codec.version>
<jetty.version>9.3.0.M0</jetty.version>
<jetty-new.version>9.3.10.v20160621</jetty-new.version>
<jetty.version>9.3.0.RC0</jetty.version>
</properties>

<dependencies>
Expand All @@ -72,21 +97,11 @@
<version>${logback.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>fluent-hc</artifactId>
<version>${httpclient.version}</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId>
<version>${httpclient.version}</version>
</dependency>
<dependency>
<groupId>org.jodd</groupId>
<artifactId>jodd-http</artifactId>
<version>${jodd-http.version}</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
Expand All @@ -111,16 +126,12 @@
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>${jedis.version}</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>org.jooq</groupId>
<artifactId>joor</artifactId>
</dependency>
</dependencies>

<dependencyManagement>
Expand Down Expand Up @@ -166,11 +177,6 @@
<artifactId>guava</artifactId>
<version>${guava.version}</version>
</dependency>
<dependency>
<groupId>org.jooq</groupId>
<artifactId>joor</artifactId>
<version>${joor.version}</version>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down Expand Up @@ -300,5 +306,4 @@
</plugins>
</build>


</project>
2 changes: 1 addition & 1 deletion weixin-java-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.github.binarywang</groupId>
<artifactId>weixin-java-parent</artifactId>
<version>2.2.0</version>
<version>2.3.0</version>
</parent>

<artifactId>weixin-java-common</artifactId>
Expand Down
Loading