一、微信小程序创建
先要去微信公众平台注册一个小程序,每个小程序都有相应的AppID(小程序ID)和AppSecret(小程序密钥),它们是获取ACCESS_TOKEN所需要的。微信公众平台地址:
https://mp.weixin.qq.com/
注册添加小程序后会取得AppID(小程序ID)和AppSecret(小程序密钥):
二、依赖引入
<dependency><groupId>com.alibaba</groupId><artifactId>fastjson</artifactId><version>1.2.41</version></dependency><dependency><groupId>org.apache.httpcomponents</groupId><artifactId>httpcl