yanghui
2022-11-01 2d6c2bba5cc8c33b7e199c05212f862fe7e92a29
#feat 获取access_token从redis获取
1个文件已修改
5 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/WxOfficialApi.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/WxOfficialApi.java
@@ -92,8 +92,9 @@
        // https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=APPID&secret=APPSECRET
        //改从redis中获取
        return stringRedisTemplate.boundValueOps("access_token:access_token:" + appid).get();
        ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue();
        log.info("appid:"+appid);
        return valueOperations.get("access_token:access_token:" + appid);
/*        String path = " https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential";
        URL url = new URL(path + "&appid=" + appid + "&secret=" + secret);