微信公众号
white......
擅长 javaSE javaEE hibernate spring 反射 设计模式 jdbc
展开
-
微信获取accesstoken
@Value("${wechat.appId}") private String appId; @Value("${wechat.appSecret}") private String appSecret; public String getAccessToken() { try { String token_url = "https://api.weixin...原创 2018-09-07 22:04:34 · 304 阅读 · 0 评论 -
微信获取openId
@Value("${wechat.appId}") private String appId; @Value("${wechat.appSecret}") private String appSecret; /** * 通过code获取判断openid * * @param code * @return */ public String getOpenid...原创 2018-09-07 22:07:04 · 501 阅读 · 0 评论 -
微信获取unionid
/** * 通过openid获取Unionid * @return */ public String getUnionidByOpenid(String openid) { try { String token_url = "https://api.weixin.qq.com/cgi-bin/user/info"; String params = "acces...原创 2018-09-07 22:10:25 · 1484 阅读 · 0 评论